about summary refs log tree commit diff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2018-02-15 20:58:16 +0000
committerJoseph Myers <joseph@codesourcery.com>2018-02-15 20:58:16 +0000
commit499b315324519f8deb5b42a143a76319934a3ab0 (patch)
tree4923f289669b62c9093e6820341706235f96cafe /sysdeps/unix/sysv
parent7fc03cf320f9ed0178babbb33de0550d393b8886 (diff)
downloadglibc-499b315324519f8deb5b42a143a76319934a3ab0.tar.gz
glibc-499b315324519f8deb5b42a143a76319934a3ab0.tar.xz
glibc-499b315324519f8deb5b42a143a76319934a3ab0.zip
Use libc_hidden_* for fputs (bug 15105).
Among other localplt test failures when building with -Os, there are
libc.so PLT references for fputs.  fputs calls normally get redirected
to _IO_fputs by a macro in include/stdio.h (and _IO_fputs in turn uses
libc_hidden_proto), but GCC can convert an fprintf call with a
constant string argument into an fputs call, which of course is then
unaffected by the macro redirection.  (I don't know why this issue
only appears with -Os.)

This patch duly adds a use of libc_hidden_proto for fputs.  I see no
obvious reason why the fputs macro redirection is needed at all, but
this patch does not change it.

Tested for x86_64 (both that it removes this particular localplt
failure for -Os - but other such failures remain so the bug can't yet
be closed - and that the testsuite continues to pass without -Os).

	[BZ #15105]
	* include/stdio.h [!_ISOMAC && IS_IN (libc)] (fputs): Use
	libc_hidden_proto.
	* libio/iofputs.c (fputs): Use libc_hidden_weak.
Diffstat (limited to 'sysdeps/unix/sysv')
0 files changed, 0 insertions, 0 deletions