diff options
Diffstat (limited to 'elf/dl-cache.c')
-rw-r--r-- | elf/dl-cache.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/elf/dl-cache.c b/elf/dl-cache.c index cfa335eb32..6ee5153ff9 100644 --- a/elf/dl-cache.c +++ b/elf/dl-cache.c @@ -1,5 +1,5 @@ /* Support for reading /etc/ld.so.cache files written by Linux ldconfig. - Copyright (C) 1996-2016 Free Software Foundation, Inc. + Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -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 @@ -133,7 +134,6 @@ while (0) int -internal_function _dl_cache_libcmp (const char *p1, const char *p2) { while (*p1 != '\0') @@ -180,7 +180,6 @@ _dl_cache_libcmp (const char *p1, const char *p2) this function must take care that it does not return references to any data in the mapping. */ char * -internal_function _dl_load_cache_lookup (const char *name) { int left, right, middle; @@ -258,8 +257,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. */ @@ -302,7 +303,7 @@ _dl_load_cache_lookup (const char *name) char *temp; temp = alloca (strlen (best) + 1); strcpy (temp, best); - return strdup (temp); + return __strdup (temp); } #ifndef MAP_COPY |