glibc/sysdeps
H.J. Lu 5a103908c0 x86-64: Implement strcpy family IFUNC selectors in C
Implement strcpy family IFUNC selectors in C.

All internal calls within libc.so can use IFUNC on x86-64 since unlike
x86, x86-64 supports PC-relative addressing to access the GOT entry so
that it can call via PLT without using an extra register.  For libc.a,
we can't use IFUNC for functions which are called before IFUNC has been
initialized.  Use IFUNC internally reduces the icache footprint since
libc.so and other codes in the process use the same implementations.
This patch uses IFUNC for strcpy family functions within libc.

	* sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add
	strcpy-sse2 and stpcpy-sse2.
	* sysdeps/x86_64/multiarch/ifunc-unaligned-ssse3.h: New file.
	* sysdeps/x86_64/multiarch/stpcpy-sse2.S: Likewise.
	* sysdeps/x86_64/multiarch/stpcpy.c: Likewise.
	* sysdeps/x86_64/multiarch/stpncpy.c: Likewise.
	* sysdeps/x86_64/multiarch/strcpy-sse2.S: Likewise.
	* sysdeps/x86_64/multiarch/strcpy.c: Likewise.
	* sysdeps/x86_64/multiarch/strncpy.c: Likewise.
	* sysdeps/x86_64/multiarch/stpcpy.S: Removed.
	* sysdeps/x86_64/multiarch/stpncpy.S: Likewise.
	* sysdeps/x86_64/multiarch/strcpy.S: Likewise.
	* sysdeps/x86_64/multiarch/strncpy.S: Likewise.
	* sysdeps/x86_64/multiarch/stpncpy-c.c (weak_alias): New.
	(libc_hidden_def): Always defined as empty.
	* sysdeps/x86_64/multiarch/strncpy-c.c (libc_hidden_builtin_def):
	Always Defined as empty.
2017-06-12 09:06:09 -07:00
..
aarch64 Optimize generic spinlock code and use C11 like atomic macros. 2017-06-06 09:41:56 +02:00
alpha Optimize generic spinlock code and use C11 like atomic macros. 2017-06-06 09:41:56 +02:00
arm Replace all internal uses of __bzero with memset. This removes the need 2017-06-12 14:56:53 +01:00
generic ld.so: Consolidate 2 strtouls into _dl_strtoul [BZ #21528] 2017-06-08 12:52:42 -07:00
gnu Regenerate sysdeps/gnu/errlist.c. 2017-06-04 15:27:14 -04:00
hppa Optimize generic spinlock code and use C11 like atomic macros. 2017-06-06 09:41:56 +02:00
i386 Optimize generic spinlock code and use C11 like atomic macros. 2017-06-06 09:41:56 +02:00
ia64 Optimize generic spinlock code and use C11 like atomic macros. 2017-06-06 09:41:56 +02:00
ieee754 float128: Add strfromf128 2017-06-07 17:08:21 -03:00
init_array Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
m68k Optimize generic spinlock code and use C11 like atomic macros. 2017-06-06 09:41:56 +02:00
mach Fix struct sigaltstack namespace (bug 21517). 2017-06-05 10:17:46 +00:00
microblaze Optimize generic spinlock code and use C11 like atomic macros. 2017-06-06 09:41:56 +02:00
mips Optimize generic spinlock code and use C11 like atomic macros. 2017-06-06 09:41:56 +02:00
nios2 Optimize generic spinlock code and use C11 like atomic macros. 2017-06-06 09:41:56 +02:00
nptl fork: Remove bogus parent PID assertions [BZ #21386] 2017-05-12 16:04:16 +02:00
posix getaddrinfo: Eliminate another strdup call 2017-06-03 08:37:31 +02:00
powerpc Optimize generic spinlock code and use C11 like atomic macros. 2017-06-06 09:41:56 +02:00
pthread Remove __need macros from signal.h. 2017-05-20 19:04:43 -04:00
s390 S390: Use generic spinlock code. 2017-06-06 09:41:56 +02:00
sh Move shared pthread definitions to common headers 2017-05-09 17:49:17 -03:00
sparc Make LD_HWCAP_MASK usable for static binaries 2017-06-07 11:11:40 +05:30
tile Optimize generic spinlock code and use C11 like atomic macros. 2017-06-06 09:41:56 +02:00
unix powerpc: add sysconf support for cache geometries 2017-06-09 14:36:22 -03:00
wordsize-32 Build divdi3 only for architecture that required it 2017-04-06 15:14:34 -03:00
wordsize-64 Add missing header files throughout the testsuite. 2017-02-16 17:33:18 -05:00
x86 Make LD_HWCAP_MASK usable for static binaries 2017-06-07 11:11:40 +05:30
x86_64 x86-64: Implement strcpy family IFUNC selectors in C 2017-06-12 09:06:09 -07:00