1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

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.
This commit is contained in:
H.J. Lu
2020-12-05 07:01:58 -08:00
parent 86a4d3fa7d
commit efbbd9c33a
26 changed files with 598 additions and 110 deletions

View File

@ -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: