glibc/sysdeps/x86_64
Joseph Myers 2cfbdb9a27 Fix strftime wcschr namespace (bug 17634).
Use of strftime, a C90 function, ends up bringing in wcschr, which is
not a C90 function.  Although not a conformance bug (C90 reserves
wcs*), this is still contrary to glibc practice of avoiding relying on
those reservations; this patch arranges for the internal uses to use
__wcschr instead, with wcschr being a weak alias.  This is more
complicated than some such patches because of the various IFUNC
definitions of wcschr (which include code redefining libc_hidden_def
in a way that involves creating __GI_wcschr manually and so also needs
to create __GI___wcschr after the change of internal uses to use
__wcschr).

Tested for x86_64 and 32-bit x86 (testsuite, and that disassembly of
installed shared libraries is unchanged by the patch).

2014-12-10  Joseph Myers  <joseph@codesourcery.com>
	    Adhemerval Zanella  <azanella@linux.vnet.ibm.com>

	[BZ #17634]
	* wcsmbs/wcschr.c [!WCSCHR] (wcschr): Define as __wcschr.
	Undefine after defining function.  Define as weak alias of
	__wcschr.  Use libc_hidden_weak.
	* include/wchar.h (__wcschr): Declare.  Use libc_hidden_proto.
	* sysdeps/i386/i686/multiarch/wcschr-c.c [IS_IN (libc) && SHARED]
	(libc_hidden_def): Also define __GI___wcschr alias.
	* sysdeps/i386/i686/multiarch/wcschr.S (wcschr): Rename to
	__wcschr and define as weak alias of __wcschr.
	* sysdeps/powerpc/power6/wcschr.c [!WCSCHR] (WCSCHR): Define as
	__wcschr.
	[!WCSCHR] (DEFAULT_WCSCHR): Define.
	[DEFAULT_WCSCHR] (__wcschr): Use libc_hidden_def.
	[DEFAULT_WCSCHR] (wcschr): Define as weak alias of __wcschr.  Use
	libc_hidden_weak.  Do not use libc_hidden_def.
	* sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c
	[IS_IN (libc) && SHARED] (libc_hidden_def): Also define
	__GI___wcschr alias.
	* sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c
	[IS_IN (libc)] (wcschr): Define as macro expanding to
	__redirect_wcschr.
	[IS_IN (libc)] (__wcschr_ppc): Use __redirect_wcschr in typeof.
	[IS_IN (libc)] (__wcschr_power6): Likewise.
	[IS_IN (libc)] (__wcschr_power7): Likewise.
	[IS_IN (libc)] (__libc_wcschr): New.  Define with libc_ifunc
	instead of wcschr.
	[IS_IN (libc)] (wcschr): Undefine and define as weak alias of
	__libc_wcschr.
	[!IS_IN (libc)] (libc_hidden_def): Do not undefine and redefine.
	* sysdeps/powerpc/powerpc64/multiarch/wcschr.c (wcschr): Rename to
	__wcschr and define as weak alias of __wcschr.  Use
	libc_hidden_builtin_def.
	* sysdeps/x86_64/wcschr.S (wcschr): Rename to __wcschr and define
	as weak alias of __wcschr.  Use libc_hidden_weak.
	* time/alt_digit.c (_nl_get_walt_digit): Use __wcschr instead of
	wcschr.
	* time/era.c (_nl_init_era_entries): Likewise.
	* conform/Makefile (test-xfail-ISO/time.h/linknamespace): Remove
	variable.
	(test-xfail-XPG3/time.h/linknamespace): Likewise.
	(test-xfail-XPG4/time.h/linknamespace): Likewise.
2014-12-10 16:59:02 +00:00
..
64 Move architecture shlib-versions files to Linux-specific directories. 2014-07-17 14:31:12 +00:00
bits Add arch-specific configuration for C11 atomics support. 2014-11-20 11:57:38 +01:00
fpu Remove x86_64 __GNUC_PREREQ (4, 6) conditional. 2014-11-14 18:53:07 +00:00
multiarch Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
nptl Remove configure tests for assembler CFI support. 2014-06-26 17:33:32 +00:00
x32 Don't use INTDEF/INTUSE with _dl_init (bug 14132). 2014-11-04 23:26:39 +00:00
Implies Use x86-64 bits/byteswap.h for both i386 and x86_64 2012-05-30 14:13:18 -07:00
Makefile Remove HP_TIMING_DIFF_INIT and dl_hp_timing_overhead 2014-07-03 08:38:25 -07:00
Versions Work around old buggy program which cannot cope with memcpy semantics. 2011-04-01 19:38:21 -04:00
____longjmp_chk.S ____longjmp_chk is now OS-specific. 2009-07-30 21:42:27 -07:00
__longjmp.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
_mcount.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
abort-instr.h Update. 2001-09-19 10:37:31 +00:00
add_n.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
addmul_1.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
backtrace.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
bsd-_setjmp.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
bsd-setjmp.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
bzero.S Make an empty file. 2007-10-16 05:59:15 +00:00
cacheinfo.c Replace cpuid asm statement with __cpuid_count 2014-08-12 17:02:51 -07:00
configure Enable AVX2 optimized memset only if -mavx2 works 2014-07-14 07:58:27 -07:00
configure.ac Enable AVX2 optimized memset only if -mavx2 works 2014-07-14 07:58:27 -07:00
crti.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
crtn.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dl-irel.h Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
dl-lookupcfg.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dl-machine.h Don't use INTDEF/INTUSE with _dl_init (bug 14132). 2014-11-04 23:26:39 +00:00
dl-runtime.c * elf/dl-runtime.c (reloc_offset): Define. 2009-03-15 00:26:14 +00:00
dl-tls.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dl-tlsdesc.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dl-tlsdesc.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dl-trampoline.S Save/restore bound registers for _dl_runtime_profile 2014-04-16 14:46:49 -07:00
dl-trampoline.h Save/restore bound registers for _dl_runtime_profile 2014-04-16 14:46:49 -07:00
ffs.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
ffsll.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
hp-timing.h Always provide HP_SMALL_TIMING_AVAIL 2014-07-03 08:38:36 -07:00
htonl.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
jmpbuf-offsets.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
jmpbuf-unwind.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
l10nflist.c Minor optimization of popcount in l10nflist 2011-08-11 14:07:04 -04:00
ldbl2mpn.c [BZ #4586] 2007-06-08 02:50:59 +00:00
ldsodefs.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
link-defines.sym Replace __int128 with __int128_t 2014-05-30 10:50:21 -07:00
locale-defines.sym Implement optimized strcaecmp for x86-64. 2010-07-30 00:14:04 -07:00
lshift.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
machine-gmon.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memchr.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memcmp.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memcpy.S Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
memcpy_chk.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memmove.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
mempcpy.S Remove bounded-pointers handling from x86_64 assembly sources. 2013-02-17 21:57:26 +00:00
mempcpy_chk.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memrchr.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memset.S Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
memset_chk.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memusage.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
mp_clz_tab.c * sysdeps/x86_64/mp_clz_tab.c: New file. 2009-04-15 04:30:41 +00:00
mul_1.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
preconfigure rename configure.in to configure.ac 2013-10-30 17:32:08 +10:00
preconfigure.ac rename configure.in to configure.ac 2013-10-30 17:32:08 +10:00
rawmemchr.S Fix x86_64 rawmemchr namespace (bug 17572). 2014-11-12 22:35:12 +00:00
rshift.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
rtld-memcmp.c Make sure no code in ld.so uses xmm/ymm registers on x86-64. 2009-07-26 16:10:00 -07:00
rtld-memset.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
rtld-strchr.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
rtld-strlen.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sched_cpucount.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
setjmp.S Remove IS_IN_rtld 2014-11-24 11:41:48 +05:30
stack-aliasing.h Clean up stack-coloring macros. 2014-06-20 19:50:16 -07:00
stackguard-macros.h BZ #15754: CVE-2013-4788 2013-09-23 00:52:09 -04:00
stackinfo.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
start.S sysdeps/x86_64/start.S doesn't have a .size elf directive for _start. 2014-11-24 16:26:58 -08:00
stpcpy.S Update. 2004-05-28 06:56:51 +00:00
stpcpy_chk.S 2004-10-15 Jakub Jelinek <jakub@redhat.com> 2004-10-18 04:17:19 +00:00
strcasecmp.S Implement optimized strcaecmp for x86-64. 2010-07-30 00:14:04 -07:00
strcasecmp_l-nonascii.c Remove pre-ISO C support 2012-01-07 23:57:22 -05:00
strcasecmp_l.S Implement optimized strcaecmp for x86-64. 2010-07-30 00:14:04 -07:00
strcat.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strchr.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strchrnul.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strcmp.S Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
strcpy.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strcpy_chk.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strcspn.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strlen.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strncase.S Add optimized strncasecmp versions for x86-64. 2010-08-14 22:04:01 -07:00
strncase_l-nonascii.c Remove pre-ISO C support 2012-01-07 23:57:22 -05:00
strncase_l.S Add optimized strncasecmp versions for x86-64. 2010-08-14 22:04:01 -07:00
strncmp.S Add SSE2 support to str{,n}cmp for x86-64. 2009-07-26 13:32:28 -07:00
strnlen.S Faster strlen on x64. 2013-03-18 07:39:12 +01:00
strpbrk.S Update. 2002-08-31 17:45:33 +00:00
strrchr.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strspn.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strtok.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strtok_r.S Remove bounded-pointers handling from x86_64 assembly sources. 2013-02-17 21:57:26 +00:00
sub_n.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
submul_1.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sysdep.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tls-macros.h Split tls-macros.h into sysdeps directories. 2012-07-17 11:30:58 +00:00
tlsdesc.c Fix -Wundef warnings for SHARED 2014-07-09 09:26:07 +01:00
tlsdesc.sym Introduce TLS descriptors for i386 and x86_64. 2008-05-13 05:41:30 +00:00
tst-audit.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-audit3.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-audit4.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-audit5.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-audit6.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-audit7.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-audit10.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-auditmod3a.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod3b.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod4a.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod4b.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod5a.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod5b.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod6a.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod6b.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod6c.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod7a.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod7b.c Move x86_64-specific audit tests to sysdeps/x86_64/. 2013-04-25 19:23:11 +00:00
tst-auditmod10a.c Save and restore AVX-512 zmm registers to x86-64 ld.so 2014-03-13 11:19:08 -07:00
tst-auditmod10b.c Save and restore AVX-512 zmm registers to x86-64 ld.so 2014-03-13 11:19:08 -07:00
tst-mallocalign1.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-quad1.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-quad1pie.c Handle R_X86_64_RELATIVE64 and R_X86_64_64 for x32 2012-05-10 17:05:06 -07:00
tst-quad2.c Handle R_X86_64_RELATIVE64 and R_X86_64_64 for x32 2012-05-10 17:05:06 -07:00
tst-quad2pie.c Handle R_X86_64_RELATIVE64 and R_X86_64_64 for x32 2012-05-10 17:05:06 -07:00
tst-quadmod1.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-quadmod1pie.S Handle R_X86_64_RELATIVE64 and R_X86_64_64 for x32 2012-05-10 17:05:06 -07:00
tst-quadmod2.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-quadmod2pie.S Handle R_X86_64_RELATIVE64 and R_X86_64_64 for x32 2012-05-10 17:05:06 -07:00
tst-stack-align.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcschr.S Fix strftime wcschr namespace (bug 17634). 2014-12-10 16:59:02 +00:00
wcscmp.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcslen.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcsrchr.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00