From efbbd9c33adfa843d65860b1b02adebb8ecb57ce Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sat, 5 Dec 2020 07:01:58 -0800 Subject: 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. --- elf/readlib.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'elf/readlib.c') diff --git a/elf/readlib.c b/elf/readlib.c index 3d52c9a980..7383c23249 100644 --- a/elf/readlib.c +++ b/elf/readlib.c @@ -75,7 +75,8 @@ is_gdb_python_file (const char *name) int process_file (const char *real_file_name, const char *file_name, const char *lib, int *flag, unsigned int *osversion, - char **soname, int is_link, struct stat64 *stat_buf) + unsigned int *isa_level, char **soname, int is_link, + struct stat64 *stat_buf) { FILE *file; struct stat64 statbuf; @@ -173,8 +174,8 @@ process_file (const char *real_file_name, const char *file_name, /* Libraries have to be shared object files. */ else if (elf_header->e_type != ET_DYN) ret = 1; - else if (process_elf_file (file_name, lib, flag, osversion, soname, - file_contents, statbuf.st_size)) + else if (process_elf_file (file_name, lib, flag, osversion, isa_level, + soname, file_contents, statbuf.st_size)) ret = 1; done: -- cgit v1.2.3