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

@ -25,6 +25,7 @@
#include <stdint.h>
#include <_itoa.h>
#include <dl-hwcaps.h>
#include <dl-isa-level.h>
#ifndef _DL_PLATFORMS_COUNT
# define _DL_PLATFORMS_COUNT 0
@ -284,6 +285,9 @@ search_cache (const char *string_table, uint32_t string_table_size,
#ifdef SHARED
named_hwcap = dl_cache_hwcap_extension (libnew);
if (named_hwcap
&& !dl_cache_hwcap_isa_level_compatible (libnew))
continue;
#endif
/* The entries with named/extension hwcaps