glibc/sysdeps/i386
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
..
fpu Add more tests of various libm functions. 2015-08-11 00:58:28 +00:00
i486 Clean up BUSY_WAIT_NOP and atomic_delay. 2015-06-30 15:57:15 +02:00
i586 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
i686 Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00
i786
nptl NPTL: swap comments for THREAD_SETMEM and THREAD_SETMEM_NC for i386 and x86_64 2015-03-28 00:44:22 -04:00
sys Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Implies Use x86-64 bits/byteswap.h for both i386 and x86_64 2012-05-30 14:13:18 -07:00
Makefile Add and use sysdeps/i386/link-defines.sym 2015-07-07 05:23:40 -07:00
Versions Merge sysdeps/i386/elf/Versions into sysdeps/i386/Versions. 2012-03-19 21:02:40 +01:00
____longjmp_chk.S Add sigstack handling to Linux ____longjmp_chk on i386. 2009-07-30 21:50:14 -07:00
__longjmp.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
abort-instr.h
add_n.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
addmul_1.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
asm-syntax.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
backtrace.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
bsd-_setjmp.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
bsd-setjmp.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
bzero.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
configure Preserve bound registers for pointer pass/return 2015-07-09 06:50:12 -07:00
configure.ac Preserve bound registers for pointer pass/return 2015-07-09 06:50:12 -07:00
crti.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
crtn.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-irel.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-lookupcfg.h Add ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA to x86 2015-03-31 05:16:57 -07:00
dl-machine.h Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00
dl-procinfo.c Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00
dl-procinfo.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-tls.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-tlsdesc.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-tlsdesc.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-trampoline.S Preserve bound registers for pointer pass/return 2015-07-09 06:50:12 -07:00
ffs.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
gccframe.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
gmp-mparam.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
htonl.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
htons.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
i386-mcount.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
jmpbuf-offsets.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
ldbl2mpn.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
ldsodefs.h Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00
link-defines.sym Preserve bound registers for pointer pass/return 2015-07-09 06:50:12 -07:00
lshift.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
machine-gmon.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
memchr.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
memcopy.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
memset.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
memusage.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
mp_clz_tab.c
mul_1.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
preconfigure Move base_machine and machine settings from configure.ac to sysdeps preconfigure fragments. 2014-06-25 17:52:56 +00:00
rawmemchr.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
rshift.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
setfpucw.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
setjmp.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
stackguard-macros.h BZ #15754: CVE-2013-4788 2013-09-23 00:52:09 -04:00
stackinfo.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
start.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
stpcpy.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
stpncpy.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
strchrnul.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strcspn.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
string-inlines.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strlen.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strpbrk.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strrchr.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strspn.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strtok.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strtok_r.S Remove remaining bounded-pointers support from i386 .S files. 2013-02-21 22:21:52 +00:00
sub_n.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
submul_1.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
sysdep.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
tls-macros.h i386: Fix build by GCC 5.0 2014-12-30 11:37:41 -08:00
tlsdesc.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
tlsdesc.sym Introduce TLS descriptors for i386 and x86_64. 2008-05-13 05:41:30 +00:00
tst-audit.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
tst-audit3.c Add a testcase for i386 LD_AUDIT 2015-07-07 05:09:30 -07:00
tst-audit3.h Add a testcase for i386 LD_AUDIT 2015-07-07 05:09:30 -07:00
tst-auditmod3a.c Add a testcase for i386 LD_AUDIT 2015-07-07 05:09:30 -07:00
tst-auditmod3b.c Add a missing break in tst-auditmod3b.c 2015-08-09 08:06:50 -07:00
tst-stack-align.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00