aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/generic/ldconfig.h
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 /sysdeps/generic/ldconfig.h
parent86a4d3fa7d1bda3c02cf713cf289d6f893970117 (diff)
downloadglibc-efbbd9c33adfa843d65860b1b02adebb8ecb57ce.tar
glibc-efbbd9c33adfa843d65860b1b02adebb8ecb57ce.tar.gz
glibc-efbbd9c33adfa843d65860b1b02adebb8ecb57ce.tar.bz2
glibc-efbbd9c33adfa843d65860b1b02adebb8ecb57ce.zip
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 'sysdeps/generic/ldconfig.h')
-rw-r--r--sysdeps/generic/ldconfig.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/sysdeps/generic/ldconfig.h b/sysdeps/generic/ldconfig.h
index eb070fd259..3ab757077d 100644
--- a/sysdeps/generic/ldconfig.h
+++ b/sysdeps/generic/ldconfig.h
@@ -70,8 +70,9 @@ const char *glibc_hwcaps_subdirectory_name
(const struct glibc_hwcaps_subdirectory *);
extern void add_to_cache (const char *path, const char *filename,
- const char *soname,
- int flags, unsigned int osversion, uint64_t hwcap,
+ const char *soname, int flags,
+ unsigned int osversion, unsigned int isa_level,
+ uint64_t hwcap,
struct glibc_hwcaps_subdirectory *);
extern void init_aux_cache (void);
@@ -79,23 +80,28 @@ extern void init_aux_cache (void);
extern void load_aux_cache (const char *aux_cache_name);
extern int search_aux_cache (struct stat64 *stat_buf, int *flags,
- unsigned int *osversion, char **soname);
+ unsigned int *osversion,
+ unsigned int *isa_level, char **soname);
extern void add_to_aux_cache (struct stat64 *stat_buf, int flags,
- unsigned int osversion, const char *soname);
+ unsigned int osversion,
+ unsigned int isa_level, const char *soname);
extern void save_aux_cache (const char *aux_cache_name);
/* Declared in readlib.c. */
extern 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);
+ const char *lib, int *flag,
+ unsigned int *osversion, unsigned int *isa_level,
+ char **soname, int is_link,
+ struct stat64 *stat_buf);
extern char *implicit_soname (const char *lib, int flag);
/* Declared in readelflib.c. */
-extern int process_elf_file (const char *file_name, const char *lib, int *flag,
- unsigned int *osversion, char **soname,
+extern int process_elf_file (const char *file_name, const char *lib,
+ int *flag, unsigned int *osversion,
+ unsigned int *isa_level, char **soname,
void *file_contents, size_t file_length);
/* Declared in chroot_canon.c. */