2018-02-15 Joseph Myers <joseph@codesourcery.com>
+ [BZ #15105]
+ * include/stdio.h [!_ISOMAC && IS_IN (libc)] (fputs): Use
+ libc_hidden_proto.
+ * libio/iofputs.c (fputs): Use libc_hidden_weak.
+
[BZ #15105]
[BZ #19463]
* libio/feof_u.c (feof_unlocked): Rename to __feof_unlocked and
# define fclose(fp) _IO_new_fclose (fp)
extern int _IO_fputs (const char*, _IO_FILE*);
libc_hidden_proto (_IO_fputs)
+/* The compiler may optimize calls to fprintf into calls to fputs.
+ Use libc_hidden_proto to ensure that those calls, not redirected by
+ the fputs macro, also do not go through the PLT. */
+libc_hidden_proto (fputs)
# define fputs(str, fp) _IO_fputs (str, fp)
extern int _IO_new_fsetpos (_IO_FILE *, const _IO_fpos_t *);
# define fsetpos(fp, posp) _IO_new_fsetpos (fp, posp)
libc_hidden_def (_IO_fputs)
weak_alias (_IO_fputs, fputs)
+libc_hidden_weak (fputs)
# ifndef _IO_MTSAFE_IO
strong_alias (_IO_fputs, __fputs_unlocked)