From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1962) id 75D843882662; Tue, 18 Jun 2024 08:53:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 75D843882662 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1718700811; bh=Re4yKOIFuWUG5r+QNhHlfMCqro42Z0MnXx/pXZZkuTM=; h=From:To:Subject:Date:From; b=WJgiIoS7RfOwrjMlb6kqaBTvca7wkm2FLiVwoinOmUVuwC+V5cNgdFlB5qq8V3LFt dxi7ECETVm/fU0ybJGLfyYCic2tVB80pMyTFZ8tilWTIxe+IaNeVQ7dh4+SDzCCNYi Ope3mx3T2y1m/hPC4rxUPZTWqPsnL46jeqFAUbIM= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Stefan Liebler To: glibc-cvs@sourceware.org Subject: [glibc] elf: Remove _DL_PLATFORMS_COUNT X-Act-Checkin: glibc X-Git-Author: Stefan Liebler X-Git-Refname: refs/heads/master X-Git-Oldrev: 43c7c5e62dbd7bf6c17f4688fb5f4990ae49e7fb X-Git-Newrev: 343439a31ed1f07da307037b2c92b8ab3367c05c Message-Id: <20240618085331.75D843882662@sourceware.org> Date: Tue, 18 Jun 2024 08:53:31 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=343439a31ed1f07da307037b2c92b8ab3367c05c commit 343439a31ed1f07da307037b2c92b8ab3367c05c Author: Stefan Liebler Date: Fri Jun 7 13:42:42 2024 +0200 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 Diff: --- sysdeps/alpha/dl-procinfo.h | 3 --- sysdeps/csky/dl-procinfo.h | 3 --- sysdeps/mips/dl-procinfo.h | 3 --- sysdeps/powerpc/dl-procinfo.h | 2 -- sysdeps/s390/dl-procinfo.h | 2 -- sysdeps/x86/dl-hwcap.h | 10 ++-------- sysdeps/x86/dl-procinfo.c | 5 ++--- sysdeps/x86/dl-procinfo.h | 1 - sysdeps/x86_64/dl-procruntime.c | 5 ++--- 9 files changed, 6 insertions(+), 28 deletions(-) diff --git a/sysdeps/alpha/dl-procinfo.h b/sysdeps/alpha/dl-procinfo.h index 90f83ec24e..a5264f9f2c 100644 --- a/sysdeps/alpha/dl-procinfo.h +++ b/sysdeps/alpha/dl-procinfo.h @@ -21,9 +21,6 @@ #include - -#define _DL_PLATFORMS_COUNT 5 - /* We cannot provide a general printing function. */ #define _dl_procinfo(type, word) -1 diff --git a/sysdeps/csky/dl-procinfo.h b/sysdeps/csky/dl-procinfo.h index 803441f52c..3e7c63ee67 100644 --- a/sysdeps/csky/dl-procinfo.h +++ b/sysdeps/csky/dl-procinfo.h @@ -22,9 +22,6 @@ #include - -#define _DL_PLATFORMS_COUNT 4 - /* We cannot provide a general printing function. */ #define _dl_procinfo(word, val) -1 diff --git a/sysdeps/mips/dl-procinfo.h b/sysdeps/mips/dl-procinfo.h index 7185542eac..79c2acc388 100644 --- a/sysdeps/mips/dl-procinfo.h +++ b/sysdeps/mips/dl-procinfo.h @@ -21,9 +21,6 @@ #include - -#define _DL_PLATFORMS_COUNT 4 - /* We cannot provide a general printing function. */ #define _dl_procinfo(type, word) -1 diff --git a/sysdeps/powerpc/dl-procinfo.h b/sysdeps/powerpc/dl-procinfo.h index 5b628a27ca..81eb9fba87 100644 --- a/sysdeps/powerpc/dl-procinfo.h +++ b/sysdeps/powerpc/dl-procinfo.h @@ -38,8 +38,6 @@ #define HWCAP_IMPORTANT (PPC_FEATURE_HAS_ALTIVEC \ + PPC_FEATURE_HAS_DFP) -#define _DL_PLATFORMS_COUNT 17 - #define _DL_FIRST_PLATFORM 32 /* Platform bits (relative to _DL_FIRST_PLATFORM). */ diff --git a/sysdeps/s390/dl-procinfo.h b/sysdeps/s390/dl-procinfo.h index ef2a084ce7..7092ed1e2d 100644 --- a/sysdeps/s390/dl-procinfo.h +++ b/sysdeps/s390/dl-procinfo.h @@ -23,8 +23,6 @@ #define _DL_HWCAP_COUNT 23 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 facility indications as stored by the "store facility list" (STFL) instruction. diff --git a/sysdeps/x86/dl-hwcap.h b/sysdeps/x86/dl-hwcap.h index e14e755bd7..246fdcd831 100644 --- a/sysdeps/x86/dl-hwcap.h +++ b/sysdeps/x86/dl-hwcap.h @@ -20,20 +20,14 @@ #if IS_IN (ldconfig) /* Since ldconfig processes both i386 and x86-64 libraries, it needs - to cover all platforms and hardware capabilities. */ -# define HWCAP_PLATFORMS_START 0 -# define HWCAP_PLATFORMS_COUNT 4 + to cover all hardware capabilities. */ # define HWCAP_IMPORTANT \ (HWCAP_X86_SSE2 | HWCAP_X86_64 | HWCAP_X86_AVX512_1) #elif defined __x86_64__ -/* For 64 bit, only cover x86-64 platforms and capabilities. */ -# define HWCAP_PLATFORMS_START 2 -# define HWCAP_PLATFORMS_COUNT 4 +/* For 64 bit, only cover x86-64 capabilities. */ # define HWCAP_IMPORTANT (HWCAP_X86_64 | HWCAP_X86_AVX512_1) #else /* 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) #endif diff --git a/sysdeps/x86/dl-procinfo.c b/sysdeps/x86/dl-procinfo.c index 165ffd89a9..b791fd3e92 100644 --- a/sysdeps/x86/dl-procinfo.c +++ b/sysdeps/x86/dl-procinfo.c @@ -16,9 +16,8 @@ License along with the GNU C Library; if not, see . */ -/* This information must be kept in sync with the _DL_HWCAP_COUNT, - HWCAP_PLATFORMS_START and HWCAP_PLATFORMS_COUNT definitions in - dl-hwcap.h. +/* This information must be kept in sync with the _DL_HWCAP_COUNT + definition in dl-hwcap.h. If anything should be added here check whether the size of each string is still ok with the given array size. diff --git a/sysdeps/x86/dl-procinfo.h b/sysdeps/x86/dl-procinfo.h index a8d7d4ed32..ea0f33bbad 100644 --- a/sysdeps/x86/dl-procinfo.h +++ b/sysdeps/x86/dl-procinfo.h @@ -22,6 +22,5 @@ #include #define _DL_HWCAP_COUNT HWCAP_COUNT -#define _DL_PLATFORMS_COUNT HWCAP_PLATFORMS_COUNT #endif /* dl-procinfo.h */ diff --git a/sysdeps/x86_64/dl-procruntime.c b/sysdeps/x86_64/dl-procruntime.c index 7078581778..0859438ed0 100644 --- a/sysdeps/x86_64/dl-procruntime.c +++ b/sysdeps/x86_64/dl-procruntime.c @@ -16,9 +16,8 @@ License along with the GNU C Library; if not, see . */ -/* This information must be kept in sync with the _DL_HWCAP_COUNT, - HWCAP_PLATFORMS_START and HWCAP_PLATFORMS_COUNT definitions in - dl-hwcap.h. +/* This information must be kept in sync with the _DL_HWCAP_COUNT + definition in dl-hwcap.h. If anything should be added here check whether the size of each string is still ok with the given array size.