aboutsummaryrefslogtreecommitdiff
path: root/elf/readlib.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-12-05 07:01:58 -0800
committerH.J. Lu <hjl.tools@gmail.com>2021-01-13 05:51:17 -0800
commitefbbd9c33adfa843d65860b1b02adebb8ecb57ce (patch)
tree79c61c55698036fc99ec936ea400c7a9975eef28 /elf/readlib.c
parent86a4d3fa7d1bda3c02cf713cf289d6f893970117 (diff)
downloadglibc-efbbd9c33adfa843d65860b1b02adebb8ecb57ce.zip
glibc-efbbd9c33adfa843d65860b1b02adebb8ecb57ce.tar.gz
glibc-efbbd9c33adfa843d65860b1b02adebb8ecb57ce.tar.bz2
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.
Diffstat (limited to 'elf/readlib.c')
-rw-r--r--elf/readlib.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/elf/readlib.c b/elf/readlib.c
index 3d52c9a..7383c23 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: