ldconfig/x86: Store ISA level in cache and aux cache
commitefbbd9c33adfa843d65860b1b02adebb8ecb57ce
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 5 Dec 2020 15:01:58 +0000 (5 07:01 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 13 Jan 2021 13:51:17 +0000 (13 05:51 -0800)
tree79c61c55698036fc99ec936ea400c7a9975eef28
parent86a4d3fa7d1bda3c02cf713cf289d6f893970117
ldconfig/x86: Store ISA level in cache and aux cache

Store ISA level in the portion of the unused upper 32 bits of the hwcaps
field in cache and the unused pad field in aux cache.  ISA level is stored
and checked only for shared objects in glibc-hwcaps subdirectories.  The
shared objects in the default directories aren't checked since there are
no fallbacks for these shared objects.

Tested on x86-64-v2, x86-64-v3 and x86-64-v4 machines with
--disable-hardcoded-path-in-tests and --enable-hardcoded-path-in-tests.
26 files changed:
elf/cache.c
elf/dl-cache.c
elf/ldconfig.c
elf/readelflib.c
elf/readlib.c
elf/tst-glibc-hwcaps-2-cache.c [new file with mode: 0644]
elf/tst-glibc-hwcaps-2-cache.root/etc/ld.so.conf [new file with mode: 0644]
elf/tst-glibc-hwcaps-2-cache.root/postclean.req [new file with mode: 0644]
elf/tst-glibc-hwcaps-2-cache.script [new file with mode: 0644]
sysdeps/generic/dl-cache.h
sysdeps/generic/dl-isa-level.h [new file with mode: 0644]
sysdeps/generic/elf-read-prop.h [new file with mode: 0644]
sysdeps/generic/ldconfig.h
sysdeps/unix/sysv/linux/arm/readelflib.c
sysdeps/unix/sysv/linux/ia64/readelflib.c
sysdeps/unix/sysv/linux/mips/readelflib.c
sysdeps/unix/sysv/linux/powerpc/readelflib.c
sysdeps/unix/sysv/linux/riscv/readelflib.c
sysdeps/unix/sysv/linux/s390/readelflib.c
sysdeps/unix/sysv/linux/sparc/readelflib.c
sysdeps/unix/sysv/linux/x86/elf-read-prop.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/x86/readelflib.c
sysdeps/unix/sysv/linux/x86_64/Makefile
sysdeps/unix/sysv/linux/x86_64/tst-glibc-hwcaps-2.c [new file with mode: 0644]
sysdeps/unix/sysv/linux/x86_64/x86-64-isa-level-VALUE.c [new file with mode: 0644]
sysdeps/x86/dl-isa-level.h [new file with mode: 0644]