elf: Remove _DL_PLATFORMS_COUNT

Remove the definitions of _DL_PLATFORMS_COUNT as those are not used
anymore after removal in elf/dl-cache.c:search_cache().

Note: On x86, we can also get rid of the definitions
HWCAP_PLATFORMS_START and HWCAP_PLATFORMS_COUNT.
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
This commit is contained in:
Stefan Liebler 2024-06-07 13:42:42 +02:00
parent 43c7c5e62d
commit 343439a31e
9 changed files with 6 additions and 28 deletions

View File

@ -21,9 +21,6 @@
#include <ldsodefs.h> #include <ldsodefs.h>
#define _DL_PLATFORMS_COUNT 5
/* We cannot provide a general printing function. */ /* We cannot provide a general printing function. */
#define _dl_procinfo(type, word) -1 #define _dl_procinfo(type, word) -1

View File

@ -22,9 +22,6 @@
#include <ldsodefs.h> #include <ldsodefs.h>
#define _DL_PLATFORMS_COUNT 4
/* We cannot provide a general printing function. */ /* We cannot provide a general printing function. */
#define _dl_procinfo(word, val) -1 #define _dl_procinfo(word, val) -1

View File

@ -21,9 +21,6 @@
#include <ldsodefs.h> #include <ldsodefs.h>
#define _DL_PLATFORMS_COUNT 4
/* We cannot provide a general printing function. */ /* We cannot provide a general printing function. */
#define _dl_procinfo(type, word) -1 #define _dl_procinfo(type, word) -1

View File

@ -38,8 +38,6 @@
#define HWCAP_IMPORTANT (PPC_FEATURE_HAS_ALTIVEC \ #define HWCAP_IMPORTANT (PPC_FEATURE_HAS_ALTIVEC \
+ PPC_FEATURE_HAS_DFP) + PPC_FEATURE_HAS_DFP)
#define _DL_PLATFORMS_COUNT 17
#define _DL_FIRST_PLATFORM 32 #define _DL_FIRST_PLATFORM 32
/* Platform bits (relative to _DL_FIRST_PLATFORM). */ /* Platform bits (relative to _DL_FIRST_PLATFORM). */

View File

@ -23,8 +23,6 @@
#define _DL_HWCAP_COUNT 23 #define _DL_HWCAP_COUNT 23
extern const char _dl_s390_cap_flags[_DL_HWCAP_COUNT][9] attribute_hidden; extern const char _dl_s390_cap_flags[_DL_HWCAP_COUNT][9] attribute_hidden;
#define _DL_PLATFORMS_COUNT 11
/* Hardware capability bit numbers are derived directly from the /* Hardware capability bit numbers are derived directly from the
facility indications as stored by the "store facility list" (STFL) facility indications as stored by the "store facility list" (STFL)
instruction. instruction.

View File

@ -20,20 +20,14 @@
#if IS_IN (ldconfig) #if IS_IN (ldconfig)
/* Since ldconfig processes both i386 and x86-64 libraries, it needs /* Since ldconfig processes both i386 and x86-64 libraries, it needs
to cover all platforms and hardware capabilities. */ to cover all hardware capabilities. */
# define HWCAP_PLATFORMS_START 0
# define HWCAP_PLATFORMS_COUNT 4
# define HWCAP_IMPORTANT \ # define HWCAP_IMPORTANT \
(HWCAP_X86_SSE2 | HWCAP_X86_64 | HWCAP_X86_AVX512_1) (HWCAP_X86_SSE2 | HWCAP_X86_64 | HWCAP_X86_AVX512_1)
#elif defined __x86_64__ #elif defined __x86_64__
/* For 64 bit, only cover x86-64 platforms and capabilities. */ /* For 64 bit, only cover x86-64 capabilities. */
# define HWCAP_PLATFORMS_START 2
# define HWCAP_PLATFORMS_COUNT 4
# define HWCAP_IMPORTANT (HWCAP_X86_64 | HWCAP_X86_AVX512_1) # define HWCAP_IMPORTANT (HWCAP_X86_64 | HWCAP_X86_AVX512_1)
#else #else
/* For 32 bit, only cover i586, i686 and SSE2. */ /* For 32 bit, only cover i586, i686 and SSE2. */
# define HWCAP_PLATFORMS_START 0
# define HWCAP_PLATFORMS_COUNT 2
# define HWCAP_IMPORTANT (HWCAP_X86_SSE2) # define HWCAP_IMPORTANT (HWCAP_X86_SSE2)
#endif #endif

View File

@ -16,9 +16,8 @@
License along with the GNU C Library; if not, see License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
/* This information must be kept in sync with the _DL_HWCAP_COUNT, /* This information must be kept in sync with the _DL_HWCAP_COUNT
HWCAP_PLATFORMS_START and HWCAP_PLATFORMS_COUNT definitions in definition in dl-hwcap.h.
dl-hwcap.h.
If anything should be added here check whether the size of each string If anything should be added here check whether the size of each string
is still ok with the given array size. is still ok with the given array size.

View File

@ -22,6 +22,5 @@
#include <dl-hwcap.h> #include <dl-hwcap.h>
#define _DL_HWCAP_COUNT HWCAP_COUNT #define _DL_HWCAP_COUNT HWCAP_COUNT
#define _DL_PLATFORMS_COUNT HWCAP_PLATFORMS_COUNT
#endif /* dl-procinfo.h */ #endif /* dl-procinfo.h */

View File

@ -16,9 +16,8 @@
License along with the GNU C Library; if not, see License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
/* This information must be kept in sync with the _DL_HWCAP_COUNT, /* This information must be kept in sync with the _DL_HWCAP_COUNT
HWCAP_PLATFORMS_START and HWCAP_PLATFORMS_COUNT definitions in definition in dl-hwcap.h.
dl-hwcap.h.
If anything should be added here check whether the size of each string If anything should be added here check whether the size of each string
is still ok with the given array size. is still ok with the given array size.