glibc/sysdeps
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
..
aarch64 Improve feenableexcept performance - avoid an unnecessary FPCR read in case 2015-08-05 16:24:02 +01:00
alpha alpha: Update libm-test-ulps 2015-05-19 09:43:54 -07:00
arm [ARM][BZ #17711] Fix extern protected data handling 2015-07-24 10:05:07 +01:00
generic Factor file identity rules out of generic rtld code. 2015-07-14 13:15:26 -07:00
gnu hurd: fix unwind-resume.c build 2015-02-08 18:46:00 +01:00
hppa hppa: _dl_symbol_address: add missing hidden def 2015-08-07 01:45:00 -04:00
i386 Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00
ia64 ia64: atomic.h: fix atomic_exchange_and_add 64bit handling 2015-07-28 02:30:15 -04:00
ieee754 Fix ldbl-128ibm tanhl inaccuracy (bug 18790). 2015-08-10 20:35:30 +00:00
init_array NPTL: Initializer for .init_array-only configurations. 2015-02-13 13:19:11 -08:00
m68k m68k: update libm test ULPs 2015-07-21 00:20:24 +02:00
mach PLT avoidance for _exit in rtld. 2015-07-09 15:25:47 -07:00
microblaze Replace ELF_RTYPE_CLASS_NOCOPY with ELF_RTYPE_CLASS_COPY 2015-03-05 08:40:41 -08:00
mips Regenerate MIPS libm-test-ulps. 2015-07-01 17:24:37 +00:00
nacl NaCl: Remove bogus O_SHLOCK, O_EXLOCK definitions. 2015-07-24 12:31:23 -07:00
nios2 Fixes extern protected data handling testcases elf/tst-protected1a 2015-07-26 05:27:18 -07:00
nptl Add and use new glibc-internal futex API. 2015-07-10 13:47:09 +02:00
posix Fix BZ #18086 -- nice resets errno to 0. 2015-08-11 23:40:00 -07:00
powerpc powerpc: Fix stpcpy performance for power8 2015-08-11 10:03:10 -03:00
pthread Use unsigned types for counters in AIO code. 2015-06-24 17:43:32 -07:00
s390 S390: Regenerate ULPs 2015-07-15 09:33:14 +02:00
sh Replace ELF_RTYPE_CLASS_NOCOPY with ELF_RTYPE_CLASS_COPY 2015-03-05 08:40:41 -08:00
sparc Improve performance of mempcpy by inlining and using memcpy. Enable 2015-08-05 16:24:04 +01:00
tile tilepro: fix warnings in sysdeps/tile/tilepro/bits/atomic.h 2015-08-04 12:07:53 -04:00
unix Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00
wordsize-32 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
wordsize-64 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
x86 Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00
x86_64 Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00