mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-25 12:11:10 +00:00
e2e4f56056
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. |
||
---|---|---|
.. | ||
bcopy.S | ||
ifunc-defines.sym | ||
ifunc-impl-list.c | ||
init-arch.h | ||
Makefile | ||
memcmp-sse4.S | ||
memcmp-ssse3.S | ||
memcmp.S | ||
memcpy_chk.S | ||
memcpy-avx-unaligned.S | ||
memcpy-sse2-unaligned.S | ||
memcpy-ssse3-back.S | ||
memcpy-ssse3.S | ||
memcpy.S | ||
memmove_chk.c | ||
memmove-avx-unaligned.S | ||
memmove-ssse3-back.S | ||
memmove-ssse3.S | ||
memmove.c | ||
mempcpy_chk.S | ||
mempcpy-avx-unaligned.S | ||
mempcpy-ssse3-back.S | ||
mempcpy-ssse3.S | ||
mempcpy.S | ||
memset_chk.S | ||
memset-avx2.S | ||
memset.S | ||
rtld-memcmp.c | ||
rtld-memset.S | ||
sched_cpucount.c | ||
stpcpy-sse2-unaligned.S | ||
stpcpy-ssse3.S | ||
stpcpy.S | ||
stpncpy-c.c | ||
stpncpy-sse2-unaligned.S | ||
stpncpy-ssse3.S | ||
stpncpy.S | ||
strcasecmp_l-ssse3.S | ||
strcasecmp_l.S | ||
strcasestr.c | ||
strcat-sse2-unaligned.S | ||
strcat-ssse3.S | ||
strcat.S | ||
strchr-sse2-no-bsf.S | ||
strchr.S | ||
strcmp-sse2-unaligned.S | ||
strcmp-sse42.S | ||
strcmp-ssse3.S | ||
strcmp.S | ||
strcpy-sse2-unaligned.S | ||
strcpy-ssse3.S | ||
strcpy.S | ||
strcspn-c.c | ||
strcspn.S | ||
strncase_l-ssse3.S | ||
strncase_l.S | ||
strncat-c.c | ||
strncat-sse2-unaligned.S | ||
strncat-ssse3.S | ||
strncat.S | ||
strncmp-ssse3.S | ||
strncmp.S | ||
strncpy-c.c | ||
strncpy-sse2-unaligned.S | ||
strncpy-ssse3.S | ||
strncpy.S | ||
strpbrk-c.c | ||
strpbrk.S | ||
strspn-c.c | ||
strspn.S | ||
strstr-sse2-unaligned.S | ||
strstr.c | ||
test-multiarch.c | ||
varshift.c | ||
varshift.h | ||
wcscpy-c.c | ||
wcscpy-ssse3.S | ||
wcscpy.S | ||
wmemcmp-c.c | ||
wmemcmp-sse4.S | ||
wmemcmp-ssse3.S | ||
wmemcmp.S |