about summary refs log tree commit diff
path: root/elf/dl-cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-cache.c')
-rw-r--r--elf/dl-cache.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/elf/dl-cache.c b/elf/dl-cache.c
index 017c78aae3..e9632da0b3 100644
--- a/elf/dl-cache.c
+++ b/elf/dl-cache.c
@@ -24,6 +24,7 @@
 #include <dl-procinfo.h>
 #include <stdint.h>
 #include <_itoa.h>
+#include <dl-hwcaps.h>
 
 #ifndef _DL_PLATFORMS_COUNT
 # define _DL_PLATFORMS_COUNT 0
@@ -258,8 +259,10 @@ _dl_load_cache_lookup (const char *name)
       if (platform != (uint64_t) -1)
 	platform = 1ULL << platform;
 
+      uint64_t hwcap_mask = GET_HWCAP_MASK();
+
 #define _DL_HWCAP_TLS_MASK (1LL << 63)
-      uint64_t hwcap_exclude = ~((GLRO(dl_hwcap) & GLRO(dl_hwcap_mask))
+      uint64_t hwcap_exclude = ~((GLRO(dl_hwcap) & hwcap_mask)
 				 | _DL_HWCAP_PLATFORM | _DL_HWCAP_TLS_MASK);
 
       /* Only accept hwcap if it's for the right platform.  */