glibc/debug
Zack Weinberg 698fb75b9f Add __v*printf_internal with flags arguments
There are a lot more printf variants than there are scanf variants,
and the code for setting up and tearing down their custom FILE
variants around the call to __vf(w)printf is more complicated and
variable.  Therefore, I have added _internal versions of all the
v*printf variants, rather than introducing helper routines so that
they can all directly call __vf(w)printf_internal, as was done with
scanf.

As with the scanf changes, in this patch the _internal functions still
look at the environmental mode bits and all callers pass 0 for the
flags parameter.

Several of the affected public functions had _IO_ name aliases that
were not exported (but, in one case, appeared in libio.h anyway);
I was originally planning to leave them as aliases to avoid having
to touch internal callers, but it turns out ldbl_*_alias only work
for exported symbols, so they've all been removed instead.  It also
turns out there were hardly any internal callers.  _IO_vsprintf and
_IO_vfprintf *are* exported, so those two stick around.

Summary for the changes to each of the affected symbols:

  _IO_vfprintf, _IO_vsprintf:
    All internal calls removed, thus the internal declarations, as well
    as uses of libc_hidden_proto and libc_hidden_def, were also removed.
    The external symbol is now exposed via uses of ldbl_strong_alias
    to __vfprintf_internal and __vsprintf_internal, respectively.

  _IO_vasprintf, _IO_vdprintf, _IO_vsnprintf,
  _IO_vfwprintf, _IO_vswprintf,
  _IO_obstack_vprintf, _IO_obstack_printf:
    All internal calls removed, thus declaration in internal headers
    were also removed.  They were never exported, so there are no
    aliases tying them to the internal functions.  I.e.: entirely gone.

  __vsnprintf:
    Internal calls were always preceded by macros such as
      #define __vsnprintf _IO_vsnprintf, and
      #define __vsnprintf vsnprintf
    The macros were removed and their uses replaced with calls to the
    new internal function __vsnprintf_internal.  Since there were no
    internal calls, the internal declaration was also removed.  The
    external symbol is preserved with ldbl_weak_alias to ___vsnprintf.

  __vfwprintf:
    All internal calls converted into calls to __vfwprintf_internal,
    thus the internal declaration was removed.  The function is now a
    wrapper that calls __vfwprintf_internal.  The external symbol is
    preserved.

  __vswprintf:
    Similarly, but no external symbol.

  __vasprintf, __vdprintf, __vfprintf, __vsprintf:
    New internal wrappers.  Not exported.

  vasprintf, vdprintf, vfprintf, vsprintf, vsnprintf,
  vfwprintf, vswprintf,
  obstack_vprintf, obstack_printf:
    These functions used to be aliases to the respective _IO_* function,
    they are now aliases to their respective __* functions.

Tested for powerpc and powerpc64le.
2018-12-05 18:15:42 -02:00
..
asprintf_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
backtrace-tst.c Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
backtrace.c Use x86_64 backtrace as generic version. 2018-03-21 17:25:30 +00:00
backtracesyms.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
backtracesymsfd.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
catchsegv.sh Update copyright dates not handled by scripts/update-copyrights. 2018-01-01 00:41:16 +00:00
chk_fail.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
confstr_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
Depend * stdlib/bits/stdlib.h: New file. 2005-07-13 06:09:58 +00:00
dprintf_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
execinfo.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
explicit_bzero_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fdelt_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fgets_chk.c Remove _IO_file_flags define. 2018-02-21 14:22:50 -05:00
fgets_u_chk.c Remove _IO_file_flags define. 2018-02-21 14:22:50 -05:00
fgetws_chk.c Remove _IO_file_flags define. 2018-02-21 14:22:50 -05:00
fgetws_u_chk.c Remove _IO_file_flags define. 2018-02-21 14:22:50 -05:00
fortify_fail.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fprintf_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fread_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fread_u_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fwprintf_chk.c Add __v*printf_internal with flags arguments 2018-12-05 18:15:42 -02:00
getcwd_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
getdomainname_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
getgroups_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
gethostname_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
gets_chk.c Remove _IO_file_flags define. 2018-02-21 14:22:50 -05:00
getwd_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
longjmp_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
Makefile Compile debug/stack_chk_fail_local.c with stack protector 2018-07-05 19:28:35 +02:00
mbsnrtowcs_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
mbsrtowcs_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
mbstowcs_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memcpy_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memmove_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
mempcpy_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memset_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
noophooks.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
obprintf_chk.c Add __v*printf_internal with flags arguments 2018-12-05 18:15:42 -02:00
pcprofile.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
pcprofiledump.c Update copyright dates not handled by scripts/update-copyrights. 2018-01-01 00:41:16 +00:00
poll_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ppoll_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
pread64_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
pread_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
printf_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
read_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
readlink_chk.c __readlink_chk: Remove micro-optimization 2018-08-21 11:24:12 +02:00
readlinkat_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
readonly-area.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
realpath_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
recv_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
recvfrom_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
segfault.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
snprintf_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
sprintf_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
stack_chk_fail_local.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
stack_chk_fail.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
stpcpy_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
stpncpy_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strcat_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strcpy_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strncat_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strncpy_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
swprintf_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
test-stpcpy_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
test-strcpy_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
tst-backtrace2.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
tst-backtrace3.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
tst-backtrace4.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
tst-backtrace5.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
tst-backtrace6.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
tst-backtrace.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
tst-chk1.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
tst-chk2.c 2004-10-15 Jakub Jelinek <jakub@redhat.com> 2004-10-18 04:17:19 +00:00
tst-chk3.c 2004-10-15 Jakub Jelinek <jakub@redhat.com> 2004-10-18 04:17:19 +00:00
tst-chk4.cc * misc/sys/cdefs.h (__va_arg_pack): Define for GCC 4.3+. 2007-09-15 02:38:04 +00:00
tst-chk5.cc * misc/sys/cdefs.h (__va_arg_pack): Define for GCC 4.3+. 2007-09-15 02:38:04 +00:00
tst-chk6.cc * misc/sys/cdefs.h (__va_arg_pack): Define for GCC 4.3+. 2007-09-15 02:38:04 +00:00
tst-lfschk1.c * posix/bits/unistd.h (pread) [__USE_FILE_OFFSET64]: Use __off64_t 2005-03-20 16:51:05 +00:00
tst-lfschk2.c * posix/bits/unistd.h (pread) [__USE_FILE_OFFSET64]: Use __off64_t 2005-03-20 16:51:05 +00:00
tst-lfschk3.c * posix/bits/unistd.h (pread) [__USE_FILE_OFFSET64]: Use __off64_t 2005-03-20 16:51:05 +00:00
tst-lfschk4.cc * misc/sys/cdefs.h (__va_arg_pack): Define for GCC 4.3+. 2007-09-15 02:38:04 +00:00
tst-lfschk5.cc * misc/sys/cdefs.h (__va_arg_pack): Define for GCC 4.3+. 2007-09-15 02:38:04 +00:00
tst-lfschk6.cc * misc/sys/cdefs.h (__va_arg_pack): Define for GCC 4.3+. 2007-09-15 02:38:04 +00:00
tst-longjmp_chk2.c test-skeleton.c: Add write_message function 2016-06-23 11:00:36 +02:00
tst-longjmp_chk3.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
tst-longjmp_chk.c tests: unify fortification handler logic 2014-02-08 06:58:43 -05:00
tst-ssp-1.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ttyname_r_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
vasprintf_chk.c Add __v*printf_internal with flags arguments 2018-12-05 18:15:42 -02:00
vdprintf_chk.c Add __v*printf_internal with flags arguments 2018-12-05 18:15:42 -02:00
Versions New string function explicit_bzero (from OpenBSD). 2016-12-16 16:21:54 -05:00
vfprintf_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
vfwprintf_chk.c Add __v*printf_internal with flags arguments 2018-12-05 18:15:42 -02:00
vprintf_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
vsnprintf_chk.c Add __v*printf_internal with flags arguments 2018-12-05 18:15:42 -02:00
vsprintf_chk.c Add __v*printf_internal with flags arguments 2018-12-05 18:15:42 -02:00
vswprintf_chk.c Add __v*printf_internal with flags arguments 2018-12-05 18:15:42 -02:00
vwprintf_chk.c Add __v*printf_internal with flags arguments 2018-12-05 18:15:42 -02:00
warning-nop.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wcpcpy_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wcpncpy_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wcrtomb_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wcscat_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wcscpy_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wcsncat_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wcsncpy_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wcsnrtombs_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wcsrtombs_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wcstombs_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wctomb_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wmemcpy_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wmemmove_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wmempcpy_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wmemset_chk.c Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
wprintf_chk.c Add __v*printf_internal with flags arguments 2018-12-05 18:15:42 -02:00
xtrace.sh Update copyright dates not handled by scripts/update-copyrights. 2018-01-01 00:41:16 +00:00