glibc/sysdeps/x86_64/multiarch
H.J. Lu e2e4f56056 Add _dl_x86_cpu_features to rtld_global
This patch adds _dl_x86_cpu_features to rtld_global in x86 ld.so
and initializes it early before __libc_start_main is called so that
cpu_features is always available when it is used and we can avoid
calling __init_cpu_features in IFUNC selectors.

	* sysdeps/i386/dl-machine.h: Include <cpu-features.c>.
	(dl_platform_init): Call init_cpu_features.
	* sysdeps/i386/dl-procinfo.c (_dl_x86_cpu_features): New.
	* sysdeps/i386/i686/cacheinfo.c
	(DISABLE_PREFERRED_MEMORY_INSTRUCTION): Removed.
	* sysdeps/i386/i686/multiarch/Makefile (aux): Remove init-arch.
	* sysdeps/i386/i686/multiarch/Versions: Removed.
	* sysdeps/i386/i686/multiarch/ifunc-defines.sym (KIND_OFFSET):
	Removed.
	* sysdeps/i386/ldsodefs.h: Include <cpu-features.h>.
	* sysdeps/unix/sysv/linux/x86/Makefile
	(libpthread-sysdep_routines): Remove init-arch.
	* sysdeps/unix/sysv/linux/x86_64/dl-procinfo.c: Include
	<sysdeps/x86_64/dl-procinfo.c> instead of
	sysdeps/generic/dl-procinfo.c>.
	* sysdeps/x86/Makefile [$(subdir) == csu] (gen-as-const-headers):
	Add cpu-features-offsets.sym and rtld-global-offsets.sym.
	[$(subdir) == elf] (sysdep-dl-routines): Add dl-get-cpu-features.
	[$(subdir) == elf] (tests): Add tst-get-cpu-features.
	[$(subdir) == elf] (tests-static): Add
	tst-get-cpu-features-static.
	* sysdeps/x86/Versions: New file.
	* sysdeps/x86/cpu-features-offsets.sym: Likewise.
	* sysdeps/x86/cpu-features.c: Likewise.
	* sysdeps/x86/cpu-features.h: Likewise.
	* sysdeps/x86/dl-get-cpu-features.c: Likewise.
	* sysdeps/x86/libc-start.c: Likewise.
	* sysdeps/x86/rtld-global-offsets.sym: Likewise.
	* sysdeps/x86/tst-get-cpu-features-static.c: Likewise.
	* sysdeps/x86/tst-get-cpu-features.c: Likewise.
	* sysdeps/x86_64/dl-procinfo.c: Likewise.
	* sysdeps/x86_64/cacheinfo.c (__cpuid_count): Removed.
	Assume USE_MULTIARCH is defined and don't check it.
	(is_intel): Replace __cpu_features with GLRO(dl_x86_cpu_features).
	(is_amd): Likewise.
	(max_cpuid): Likewise.
	(intel_check_word): Likewise.
	(__cache_sysconf): Don't call __init_cpu_features.
	(__x86_preferred_memory_instruction): Removed.
	(init_cacheinfo): Don't call __init_cpu_features. Replace
	__cpu_features with GLRO(dl_x86_cpu_features).
	* sysdeps/x86_64/dl-machine.h: <cpu-features.c>.
	(dl_platform_init): Call init_cpu_features.
	* sysdeps/x86_64/ldsodefs.h: Include <cpu-features.h>.
	* sysdeps/x86_64/multiarch/Makefile (aux): Remove init-arch.
	* sysdeps/x86_64/multiarch/Versions: Removed.
	* sysdeps/x86_64/multiarch/cacheinfo.c: Likewise.
	* sysdeps/x86_64/multiarch/init-arch.c: Likewise.
	* sysdeps/x86_64/multiarch/ifunc-defines.sym (KIND_OFFSET):
	Removed.
	* sysdeps/x86_64/multiarch/init-arch.h: Rewrite.
2015-08-13 03:41:22 -07:00
..
Makefile Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00
bcopy.S Use IFUNC memmove/memset in x86-64 bcopy/bzero 2012-10-11 13:58:16 -07:00
ifunc-defines.sym Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00
ifunc-impl-list.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
init-arch.h Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00
memcmp-sse4.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
memcmp-ssse3.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
memcmp.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
memcpy-avx-unaligned.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
memcpy-sse2-unaligned.S Compile {memcpy,strcmp}-sse2-unaligned.S only for libc 2015-08-05 08:28:37 -07:00
memcpy-ssse3-back.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
memcpy-ssse3.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
memcpy.S Use AVX unaligned memcpy only if AVX2 is available 2015-01-30 15:37:58 -08:00
memcpy_chk.S Use AVX unaligned memcpy only if AVX2 is available 2015-01-30 15:37:58 -08:00
memmove-avx-unaligned.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
memmove-ssse3-back.S Improve 64bit memcpy/memmove for Atom, Core 2 and Core i7 2010-06-30 08:26:11 -07:00
memmove-ssse3.S Improve 64bit memcpy/memmove for Atom, Core 2 and Core i7 2010-06-30 08:26:11 -07:00
memmove.c Use AVX unaligned memcpy only if AVX2 is available 2015-01-30 15:37:58 -08:00
memmove_chk.c Use AVX unaligned memcpy only if AVX2 is available 2015-01-30 15:37:58 -08:00
mempcpy-avx-unaligned.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
mempcpy-ssse3-back.S Improve 64bit memcpy/memmove for Atom, Core 2 and Core i7 2010-06-30 08:26:11 -07:00
mempcpy-ssse3.S Improve 64bit memcpy/memmove for Atom, Core 2 and Core i7 2010-06-30 08:26:11 -07:00
mempcpy.S Use AVX unaligned memcpy only if AVX2 is available 2015-01-30 15:37:58 -08:00
mempcpy_chk.S Use AVX unaligned memcpy only if AVX2 is available 2015-01-30 15:37:58 -08:00
memset-avx2.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
memset.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
memset_chk.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
rtld-memcmp.c x86-64 SSE4 optimized memcmp 2010-04-14 00:12:53 -07:00
rtld-memset.S Add x86_64 memset optimized for AVX2 2014-06-19 15:14:08 -07:00
sched_cpucount.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
stpcpy-sse2-unaligned.S Improved st{r,p}{,n}cpy for SSE2 and SSSE3 on x86-64 2011-06-24 15:14:22 -04:00
stpcpy-ssse3.S Improved st{r,p}{,n}cpy for SSE2 and SSSE3 on x86-64 2011-06-24 15:14:22 -04:00
stpcpy.S Add x86-64 __libc_ifunc_impl_list 2012-10-11 16:41:12 -07:00
stpncpy-c.c SSSE3 strcpy/stpcpy for x86-64 2009-07-02 03:39:03 -07:00
stpncpy-sse2-unaligned.S Improved st{r,p}{,n}cpy for SSE2 and SSSE3 on x86-64 2011-06-24 15:14:22 -04:00
stpncpy-ssse3.S Improved st{r,p}{,n}cpy for SSE2 and SSSE3 on x86-64 2011-06-24 15:14:22 -04:00
stpncpy.S Add x86-64 __libc_ifunc_impl_list 2012-10-11 16:41:12 -07:00
strcasecmp_l-ssse3.S Fix x86-64 build without multiarch. 2010-08-14 14:56:32 -07:00
strcasecmp_l.S Add x86-64 __libc_ifunc_impl_list 2012-10-11 16:41:12 -07:00
strcasestr.c Add strstr with unaligned loads. Fixes bug 12100. 2013-12-14 20:08:13 +01:00
strcat-sse2-unaligned.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strcat-ssse3.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strcat.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strchr-sse2-no-bsf.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strchr.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strcmp-sse2-unaligned.S Compile {memcpy,strcmp}-sse2-unaligned.S only for libc 2015-08-05 08:28:37 -07:00
strcmp-sse42.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strcmp-ssse3.S Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
strcmp.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strcpy-sse2-unaligned.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strcpy-ssse3.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strcpy.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strcspn-c.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strcspn.S Use strspn/strcspn/strpbrk ifunc in internal calls. 2015-05-12 20:18:51 +02:00
strncase_l-ssse3.S Add optimized strncasecmp versions for x86-64. 2010-08-14 22:04:01 -07:00
strncase_l.S Add x86-64 __libc_ifunc_impl_list 2012-10-11 16:41:12 -07:00
strncat-c.c Improve 64 bit strcat functions with SSE2/SSSE3 2011-07-19 17:11:54 -04:00
strncat-sse2-unaligned.S Improve 64 bit strcat functions with SSE2/SSSE3 2011-07-19 17:11:54 -04:00
strncat-ssse3.S Improve 64 bit strcat functions with SSE2/SSSE3 2011-07-19 17:11:54 -04:00
strncat.S Add x86-64 __libc_ifunc_impl_list 2012-10-11 16:41:12 -07:00
strncmp-ssse3.S Don't define x86-64 __strncmp_ssse3 in libc.a 2012-09-27 07:43:03 -07:00
strncmp.S Add x86-64 __libc_ifunc_impl_list 2012-10-11 16:41:12 -07:00
strncpy-c.c SSSE3 strcpy/stpcpy for x86-64 2009-07-02 03:39:03 -07:00
strncpy-sse2-unaligned.S Improved st{r,p}{,n}cpy for SSE2 and SSSE3 on x86-64 2011-06-24 15:14:22 -04:00
strncpy-ssse3.S Improved st{r,p}{,n}cpy for SSE2 and SSSE3 on x86-64 2011-06-24 15:14:22 -04:00
strncpy.S Add x86-64 __libc_ifunc_impl_list 2012-10-11 16:41:12 -07:00
strpbrk-c.c Don't define __strpbrk_sse42 in static library 2010-03-24 12:16:24 -07:00
strpbrk.S Add x86-64 __libc_ifunc_impl_list 2012-10-11 16:41:12 -07:00
strspn-c.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strspn.S Use strspn/strcspn/strpbrk ifunc in internal calls. 2015-05-12 20:18:51 +02:00
strstr-sse2-unaligned.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strstr.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
test-multiarch.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
varshift.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
varshift.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
wcscpy-c.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
wcscpy-ssse3.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
wcscpy.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
wmemcmp-c.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
wmemcmp-sse4.S Optimized memcmp and wmemcmp for x86-64 and x86-32 2011-10-15 11:10:08 -04:00
wmemcmp-ssse3.S Optimized memcmp and wmemcmp for x86-64 and x86-32 2011-10-15 11:10:08 -04:00
wmemcmp.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00