From patchwork Wed Jun 12 07:32:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Liebler X-Patchwork-Id: 91956 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A9B56385DDD2 for ; Wed, 12 Jun 2024 07:33:58 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 02E073858D39 for ; Wed, 12 Jun 2024 07:33:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 02E073858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 02E073858D39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718177609; cv=none; b=IMHqirO4Oru3b7tsD1Hlsjx5jAW4MH5svjIC2zkuP7YvqKSXy6ym3LTVoYQ4kYRrNegf6TietHqI8zzNuVGh0F/NyHUI0Lc1mV7Zb3QAA6RokgYqOrZuzMClFBsiOgnwnWuultShYUkVClVCthylffjcjCG7ruhj4I9tpsmPPow= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718177609; c=relaxed/simple; bh=YitAn/g706BhiBtGdwLpM4Hs+YbCO4OFSG6KdmtMOpk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=I9fzAMLT2L1B7BtcRfA6kt+Irq9Kk8KsQMg7L6W+gmvo57mC5MXfp2K3anxavoVvz28vrlsXD/RJvtwhVhY3XgvEZpF5XhjXg8LdOUvklKEalE83vBr0Qy/40vcXEkn2apx2ppzdLKcdllifqBAu4aOoBSDmCa0Pj/w0W/9pvdE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0356517.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45C7Sipj023926; Wed, 12 Jun 2024 07:33:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from :to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:mime-version; s=pp1; bh=+Vyx088otcKrA dD41HJnJAx+tUNZX9lz/Qpv2ijUB9M=; b=OGsCgGUkHWTzlJUiYZb9YTLwSjSg9 +QftiOju4P3FboehlOBlDjvAlDSA2f+Zua0/hw9sSowcmdjYaik3dM7GZUHV53us H/Df6vbq+uGoSOBKzC/bKLQEKYDzUou9mjc/I1S/NdNr4uplAacym+O8GL46OTM1 5y3zzVMPOPawWWnPdEhHtFx1xWhbZN3iBBHa2edr7Jlduda/OayChuP88qKkxA33 2R/u36a3dM/owcmBDJRJh6eFDGn7wSS+9dT8q6ctXCXkC7URI2EGaCrjFhMFjTmP foQlJSoXGLy359MPVljYgUmDk6++VKJoHcNcIVPQJBoTozcuGXRvi97rw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yq7apg0ba-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Jun 2024 07:33:22 +0000 (GMT) Received: from m0356517.ppops.net (m0356517.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 45C7XMBh000793; Wed, 12 Jun 2024 07:33:22 GMT Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yq7apg0b8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Jun 2024 07:33:22 +0000 (GMT) Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 45C6svKj028680; Wed, 12 Jun 2024 07:33:21 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3yn1mubmwc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Jun 2024 07:33:21 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 45C7XFpH50200994 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 12 Jun 2024 07:33:17 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CC3F52005A; Wed, 12 Jun 2024 07:33:15 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9C97B2004D; Wed, 12 Jun 2024 07:33:15 +0000 (GMT) Received: from a35lp68.lnxne.boe (unknown [9.152.108.100]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 12 Jun 2024 07:33:15 +0000 (GMT) From: Stefan Liebler To: libc-alpha@sourceware.org Cc: fweimer@redhat.com, devel@otheo.eu, adhemerval.zanella@linaro.org, bergner@linux.ibm.com, Stefan Liebler Subject: [V2] elf: Remove platform strings in dl-procinfo.c Date: Wed, 12 Jun 2024 09:32:36 +0200 Message-ID: <20240612073235.702683-2-stli@linux.ibm.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <0e5caf48-b710-4049-9129-1680406a9b5a@linaro.org> References: <0e5caf48-b710-4049-9129-1680406a9b5a@linaro.org> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: YC9f4GEht3EIEf5_ArZ6GpsdnZzsbuhJ X-Proofpoint-ORIG-GUID: 4OnID9-xKA8E4rJMGWLDNQZi_KKRE_eK X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-12_04,2024-06-11_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 malwarescore=0 impostorscore=0 clxscore=1015 lowpriorityscore=0 suspectscore=0 priorityscore=1501 spamscore=0 phishscore=0 bulkscore=0 adultscore=0 mlxlogscore=764 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2406120052 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Remove the platform strings in dl-procinfo.c where also the implementation of _dl_string_platform() was removed. --- sysdeps/alpha/dl-procinfo.c | 62 --------------------------------- sysdeps/csky/dl-procinfo.c | 62 --------------------------------- sysdeps/mips/dl-procinfo.c | 49 ++++---------------------- sysdeps/s390/dl-procinfo-s390.c | 6 ---- sysdeps/s390/dl-procinfo.h | 1 - sysdeps/x86/dl-procinfo.c | 16 --------- 6 files changed, 7 insertions(+), 189 deletions(-) delete mode 100644 sysdeps/alpha/dl-procinfo.c delete mode 100644 sysdeps/csky/dl-procinfo.c diff --git a/sysdeps/alpha/dl-procinfo.c b/sysdeps/alpha/dl-procinfo.c deleted file mode 100644 index 633dcbf974..0000000000 --- a/sysdeps/alpha/dl-procinfo.c +++ /dev/null @@ -1,62 +0,0 @@ -/* Data for Alpha version of processor capability information. - Copyright (C) 2008-2024 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 - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - . */ - -/* This information must be kept in sync with the _DL_PLATFORM_COUNT - definitions in procinfo.h. - - If anything should be added here check whether the size of each string - is still ok with the given array size. - - All the #ifdefs in the definitions are quite irritating but - necessary if we want to avoid duplicating the information. There - are three different modes: - - - PROCINFO_DECL is defined. This means we are only interested in - declarations. - - - PROCINFO_DECL is not defined: - - + if SHARED is defined the file is included in an array - initializer. The .element = { ... } syntax is needed. - - + if SHARED is not defined a normal array initialization is - needed. - */ - -#ifndef PROCINFO_CLASS -#define PROCINFO_CLASS -#endif - -#if !defined PROCINFO_DECL && defined SHARED - ._dl_alpha_platforms -#else -PROCINFO_CLASS const char _dl_alpha_platforms[5][5] -#endif -#ifndef PROCINFO_DECL -= { - "ev4", "ev5", "ev56", "ev6", "ev67" - } -#endif -#if !defined SHARED || defined PROCINFO_DECL -; -#else -, -#endif - -#undef PROCINFO_DECL -#undef PROCINFO_CLASS diff --git a/sysdeps/csky/dl-procinfo.c b/sysdeps/csky/dl-procinfo.c deleted file mode 100644 index 0c81518cff..0000000000 --- a/sysdeps/csky/dl-procinfo.c +++ /dev/null @@ -1,62 +0,0 @@ -/* Data for C-SKY version of processor capability information. - Copyright (C) 2018-2024 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 - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - . */ - -/* This information must be kept in sync with the _DL_PLATFORM_COUNT - definitions in procinfo.h. - - If anything should be added here check whether the size of each string - is still ok with the given array size. - - All the #ifdefs in the definitions are quite irritating but - necessary if we want to avoid duplicating the information. There - are three different modes: - - - PROCINFO_DECL is defined. This means we are only interested in - declarations. - - - PROCINFO_DECL is not defined: - - + if SHARED is defined the file is included in an array - initializer. The .element = { ... } syntax is needed. - - + if SHARED is not defined a normal array initialization is - needed. - */ - -#ifndef PROCINFO_CLASS -# define PROCINFO_CLASS -#endif - -#if !defined PROCINFO_DECL && defined SHARED - ._dl_csky_platforms -#else -PROCINFO_CLASS const char _dl_csky_platforms[4][6] -#endif -#ifndef PROCINFO_DECL -= { - "ck610", "ck807", "ck810", "ck860" - } -#endif -#if !defined SHARED || defined PROCINFO_DECL -; -#else -, -#endif - -#undef PROCINFO_DECL -#undef PROCINFO_CLASS diff --git a/sysdeps/mips/dl-procinfo.c b/sysdeps/mips/dl-procinfo.c index 0b1dfeea2d..6a1aaefef2 100644 --- a/sysdeps/mips/dl-procinfo.c +++ b/sysdeps/mips/dl-procinfo.c @@ -16,47 +16,12 @@ License along with the GNU C Library. If not, see . */ -/* This information must be kept in sync with the _DL_PLATFORM_COUNT - definitions in procinfo.h. - - If anything should be added here check whether the size of each string - is still ok with the given array size. - - All the #ifdefs in the definitions are quite irritating but - necessary if we want to avoid duplicating the information. There - are three different modes: - - - PROCINFO_DECL is defined. This means we are only interested in - declarations. - - - PROCINFO_DECL is not defined: - - + if SHARED is defined the file is included in an array - initializer. The .element = { ... } syntax is needed. - - + if SHARED is not defined a normal array initialization is - needed. - */ - -#ifndef PROCINFO_CLASS -#define PROCINFO_CLASS -#endif - -#if !defined PROCINFO_DECL && defined SHARED - ._dl_mips_platforms -#else -PROCINFO_CLASS const char _dl_mips_platforms[4][11] -#endif -#ifndef PROCINFO_DECL -= { - "loongson2e", "loongson2f", "octeon", "octeon2" - } -#endif -#if !defined SHARED || defined PROCINFO_DECL -; -#else -, -#endif - +/* Note: + When compiling elf/ldconfig.c, PROCINFO_CLASS is defined to static. + This dl-procinfo.c is included in sysdeps/generic/ldsodefs.h. + Afterwards, if not yet defined, PROCINFO_CLASS is defined to EXTERN + just before dl-vdso-setup.c is included. A "static" _dl_vdso_xyz + function prototype would lead to gcc warnings/errors: defined but + not used. */ #undef PROCINFO_DECL #undef PROCINFO_CLASS diff --git a/sysdeps/s390/dl-procinfo-s390.c b/sysdeps/s390/dl-procinfo-s390.c index 2821e40cb1..652f6067a3 100644 --- a/sysdeps/s390/dl-procinfo-s390.c +++ b/sysdeps/s390/dl-procinfo-s390.c @@ -24,9 +24,3 @@ const char _dl_s390_cap_flags[_DL_HWCAP_COUNT][9] = "highgprs", "te", "vx", "vxd", "vxe", "gs", "vxe2", "vxp", "sort", "dflt", "vxp2", "nnpa", "pcimio", "sie" }; - -const char _dl_s390_platforms[_DL_PLATFORMS_COUNT][7] = - { - "g5", "z900", "z990", "z9-109", "z10", "z196", "zEC12", "z13", "z14", "z15", - "z16" - }; diff --git a/sysdeps/s390/dl-procinfo.h b/sysdeps/s390/dl-procinfo.h index ffeb655ad0..63c9889f94 100644 --- a/sysdeps/s390/dl-procinfo.h +++ b/sysdeps/s390/dl-procinfo.h @@ -24,7 +24,6 @@ extern const char _dl_s390_cap_flags[_DL_HWCAP_COUNT][9] attribute_hidden; #define _DL_PLATFORMS_COUNT 11 -extern const char _dl_s390_platforms[_DL_PLATFORMS_COUNT][7] attribute_hidden; /* The kernel provides up to 32 capability bits with elf_hwcap. */ #define _DL_FIRST_PLATFORM 32 diff --git a/sysdeps/x86/dl-procinfo.c b/sysdeps/x86/dl-procinfo.c index 5920d4b320..165ffd89a9 100644 --- a/sysdeps/x86/dl-procinfo.c +++ b/sysdeps/x86/dl-procinfo.c @@ -71,22 +71,6 @@ PROCINFO_CLASS const char _dl_x86_hwcap_flags[3][9] , #endif -#if !defined PROCINFO_DECL && defined SHARED - ._dl_x86_platforms -#else -PROCINFO_CLASS const char _dl_x86_platforms[4][9] -#endif -#ifndef PROCINFO_DECL -= { - "i586", "i686", "haswell", "xeon_phi" - } -#endif -#if !defined SHARED || defined PROCINFO_DECL -; -#else -, -#endif - #if defined SHARED && !IS_IN (ldconfig) # if !defined PROCINFO_DECL ._dl_x86_tlsdesc_dynamic