From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-xc2e.google.com (mail-oo1-xc2e.google.com [IPv6:2607:f8b0:4864:20::c2e]) by sourceware.org (Postfix) with ESMTPS id 2B61A385DDD3 for ; Tue, 11 Jun 2024 19:10:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2B61A385DDD3 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2B61A385DDD3 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::c2e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718133007; cv=none; b=KI6XYWmDo/2DCPLdlcckqMvxa6eudMGInIx4SddlviNjaMLR54HjT5sc+UsQoZLlejTFL1uVO6v7GMFf2p8F5GYTUtvTmHN4hxrGEzMScPMF5F59F0ODxKdTwejJSGSACSBEdr3HCUmYawlJIl2zQlmY8TiLMCv+yxTmuc92TwU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718133007; c=relaxed/simple; bh=/bZ7swUSq5etcnLyzKPYgxio5jXkiEtb7IzAzhQ8HeU=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=l/TsiGmVWH/a0wS3WkcZm15zppOAIo5iu8DlaYmmZg7wyOt7ofHUqxWOYv9xo34NgnLM/VDbAForARvxdBpj0xXcn2iiBQEJTmcbN0S4UCFX3Dq7x3J9fKWn4L6CDJl2RxE2CcdYBUZjo/1cnKRpBY3YhplBL6kFInlsnB425M8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oo1-xc2e.google.com with SMTP id 006d021491bc7-5b9778bb7c8so699926eaf.3 for ; Tue, 11 Jun 2024 12:10:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718133004; x=1718737804; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=deyEVYw5lEoRLmR3N/zJHEt5ZhLrM6K0GHuWyrpZXgk=; b=lkzUW4QQRiR3HYqdOqdHCPOOZ2UaJwe8Rwfhi+uNQa1Tzv9z//CJk9VcsO88Qr8QDG /D+pmROUJUe4N0LsPYLt5f1nNnmGp9vxnmYTaYIx6dV9GPLr80dDNRwxCUqjpC59jfeH F02iJa74NzlEpBm+yn/g84g8QHmg2bGSoEtAnfuANSlQk/PyvUV3x0VUcIWE/szkmts5 kcuTSrkcOUpKMcBFzz86lRoo8hvQ/84nY5wj/NK6c13+njvPtTslwEw94G4j70nY96jE zR0zbOlxGzknw0CGouROKkpk2AFy0Pbe3vAvTWH67s9hlsi8d5O7GFGwpNhOahzjnkxA FT3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718133004; x=1718737804; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=deyEVYw5lEoRLmR3N/zJHEt5ZhLrM6K0GHuWyrpZXgk=; b=l59toc3FuB1TcNBF6hmYgeR5dm+EHNTPdgPSIMW9DO0XHhE0bX5jkeAxMgDA7la4C6 lr4pJcds5mN0pR8R1HtEj3zd4+ZN/j1B1n8klEj9WPnkpXQVhg4myS8gyBMZVqu++Cun lzSB9PRC09mYlBV2G+gHi4cXaT5Bl3x56OgcDn9+2yin6Oj+Kn7uMxZDZ0ocTedqv3uj g441q9GpcE0I9hzSXQkUCc0rwnkuLA6WuKaEmEpM/Q547436dSuzvbtbp1x763nZ7ISz i1vz4vdPqfyq3veHoaAdX8HToSbBCJcXpzsd8uqPKy8TqU2bT6ElXHESvLLFs/CDEQS7 jdCQ== X-Forwarded-Encrypted: i=1; AJvYcCX0SZbLDi+Fvb6C2C7iRMwy7ZCQ4TT1Ml1stOsGqYgwTIQyTLNn6M8ZyFcomlnH9si9SbECAvBx5oOAOj6gMyCGN1o1iOgPECga X-Gm-Message-State: AOJu0YwsqNsBW1UsUR0HAv8h2C8AJtee/vVKevW74wtFA5l9HZof5Hh9 f0I9O5AseinzCJoocD4XNuSsm428y6ugkpOxxJC5mZIxxot9mh7yTBk7vL9qq3TqN1uR5AGPWRa l X-Google-Smtp-Source: AGHT+IEhVGpMyQGfCaOPw6vS5JRnMaaLLQR8428vALR9zctDq8MaVlQAZUU0yP8PHLLuguZ7ngGMrw== X-Received: by 2002:a05:6358:2c8e:b0:19f:346d:d1d1 with SMTP id e5c5f4694b2df-19f346dd24emr1239193055d.16.1718133004135; Tue, 11 Jun 2024 12:10:04 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c0:c5fb:e1da:f9b7:66da:199? ([2804:1b3:a7c0:c5fb:e1da:f9b7:66da:199]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-6e5882288a5sm5677715a12.6.2024.06.11.12.10.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Jun 2024 12:10:03 -0700 (PDT) Message-ID: Date: Tue, 11 Jun 2024 16:09:58 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC 3/9] elf: Remove _dl_string_platform To: Stefan Liebler , libc-alpha@sourceware.org Cc: fweimer@redhat.com, devel@otheo.eu, bergner@linux.ibm.com References: <20240607114543.659306-1-stli@linux.ibm.com> <20240607114543.659306-4-stli@linux.ibm.com> Content-Language: en-US From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <20240607114543.659306-4-stli@linux.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,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 List-Id: On 07/06/24 08:42, Stefan Liebler wrote: > Despite of powerpc where the returned integer is stored in tcb, > and the diagnostics output, there is no user anymore. > > Thus this patch removes the diagnostics output and > _dl_string_platform for all other platforms. LGTM, thanks Reviewed-by: Adhemerval Zanella > --- > elf/dl-diagnostics.c | 2 -- > sysdeps/alpha/dl-procinfo.h | 15 --------------- > sysdeps/csky/dl-procinfo.h | 15 --------------- > sysdeps/generic/dl-procinfo.h | 2 -- > sysdeps/mips/dl-procinfo.h | 15 --------------- > sysdeps/s390/dl-procinfo.h | 15 --------------- > sysdeps/sparc/dl-procinfo.h | 2 -- > sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h | 2 -- > sysdeps/unix/sysv/linux/arm/dl-procinfo.h | 2 -- > sysdeps/x86/dl-procinfo.h | 15 --------------- > 10 files changed, 85 deletions(-) > > diff --git a/elf/dl-diagnostics.c b/elf/dl-diagnostics.c > index aaf67b87e8..e69463b2bd 100644 > --- a/elf/dl-diagnostics.c > +++ b/elf/dl-diagnostics.c > @@ -245,8 +245,6 @@ _dl_print_diagnostics (char **environ) > _dl_diagnostics_print_labeled_string ("dl_platform", GLRO (dl_platform)); > _dl_diagnostics_print_labeled_string > ("dl_profile_output", GLRO (dl_profile_output)); > - _dl_diagnostics_print_labeled_value > - ("dl_string_platform", _dl_string_platform ( GLRO (dl_platform))); > > _dl_diagnostics_print_labeled_string ("dso.ld", LD_SO); > _dl_diagnostics_print_labeled_string ("dso.libc", LIBC_SO); > diff --git a/sysdeps/alpha/dl-procinfo.h b/sysdeps/alpha/dl-procinfo.h > index f1e2e98e08..bc4db868a9 100644 > --- a/sysdeps/alpha/dl-procinfo.h > +++ b/sysdeps/alpha/dl-procinfo.h > @@ -27,21 +27,6 @@ > > #define _DL_PLATFORMS_COUNT 5 > > -static inline int > -__attribute__ ((unused, always_inline)) > -_dl_string_platform (const char *str) > -{ > - int i; > - > - if (str != NULL) > - for (i = 0; i < _DL_PLATFORMS_COUNT; ++i) > - { > - if (strcmp (str, GLRO(dl_alpha_platforms)[i]) == 0) > - return i; > - } > - return -1; > -}; > - > /* 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 77621e4b20..a54e8de446 100644 > --- a/sysdeps/csky/dl-procinfo.h > +++ b/sysdeps/csky/dl-procinfo.h > @@ -27,21 +27,6 @@ > > #define _DL_PLATFORMS_COUNT 4 > > -static inline int > -__attribute__ ((unused, always_inline)) > -_dl_string_platform (const char *str) > -{ > - int i; > - > - if (str != NULL) > - for (i = 0; i < _DL_PLATFORMS_COUNT; ++i) > - { > - if (strcmp (str, GLRO(dl_csky_platforms)[i]) == 0) > - return i; > - } > - return -1; > -}; > - > /* We cannot provide a general printing function. */ > #define _dl_procinfo(word, val) -1 > > diff --git a/sysdeps/generic/dl-procinfo.h b/sysdeps/generic/dl-procinfo.h > index c4818497c8..00e1ae7b2f 100644 > --- a/sysdeps/generic/dl-procinfo.h > +++ b/sysdeps/generic/dl-procinfo.h > @@ -34,6 +34,4 @@ > /* We don't have any hardware capabilities. */ > #define _DL_HWCAP_COUNT 0 > > -#define _dl_string_platform(str) (-1) > - > #endif /* dl-procinfo.h */ > diff --git a/sysdeps/mips/dl-procinfo.h b/sysdeps/mips/dl-procinfo.h > index 6655e68f54..3199434390 100644 > --- a/sysdeps/mips/dl-procinfo.h > +++ b/sysdeps/mips/dl-procinfo.h > @@ -27,21 +27,6 @@ > > #define _DL_PLATFORMS_COUNT 4 > > -static inline int > -__attribute__ ((unused, always_inline)) > -_dl_string_platform (const char *str) > -{ > - int i; > - > - if (str != NULL) > - for (i = 0; i < _DL_PLATFORMS_COUNT; ++i) > - { > - if (strcmp (str, GLRO(dl_mips_platforms)[i]) == 0) > - return i; > - } > - return -1; > -}; > - > /* We cannot provide a general printing function. */ > #define _dl_procinfo(type, word) -1 > > diff --git a/sysdeps/s390/dl-procinfo.h b/sysdeps/s390/dl-procinfo.h > index 38e77f7ad9..ffeb655ad0 100644 > --- a/sysdeps/s390/dl-procinfo.h > +++ b/sysdeps/s390/dl-procinfo.h > @@ -83,19 +83,4 @@ _dl_hwcap_string (int idx) > return _dl_s390_cap_flags[idx]; > }; > > -static inline int > -__attribute__ ((unused, always_inline)) > -_dl_string_platform (const char *str) > -{ > - int i; > - > - if (str != NULL) > - for (i = 0; i < _DL_PLATFORMS_COUNT; ++i) > - { > - if (strcmp (str, _dl_s390_platforms[i]) == 0) > - return _DL_FIRST_PLATFORM + i; > - } > - return -1; > -}; > - > #endif /* dl-procinfo.h */ > diff --git a/sysdeps/sparc/dl-procinfo.h b/sysdeps/sparc/dl-procinfo.h > index 61cd296de0..dbb1a4d324 100644 > --- a/sysdeps/sparc/dl-procinfo.h > +++ b/sysdeps/sparc/dl-procinfo.h > @@ -60,6 +60,4 @@ _dl_hwcap_string (int idx) > /* There're no platforms to filter out. */ > #define _DL_HWCAP_PLATFORM 0 > > -#define _dl_string_platform(str) (-1) > - > #endif /* dl-procinfo.h */ > diff --git a/sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h b/sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h > index 6a3fb78c47..0ed89c5e41 100644 > --- a/sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h > +++ b/sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h > @@ -40,6 +40,4 @@ _dl_hwcap_string (int idx) > /* There're no platforms to filter out. */ > #define _DL_HWCAP_PLATFORM 0 > > -#define _dl_string_platform(str) (-1) > - > #endif /* dl-procinfo.h */ > diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h > index 49cf0008b2..2a1c5985ee 100644 > --- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h > +++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h > @@ -75,6 +75,4 @@ _dl_procinfo (unsigned int type, unsigned long int word) > > #define HWCAP_IMPORTANT (HWCAP_ARM_VFP | HWCAP_ARM_NEON) > > -#define _dl_string_platform(str) (-1) > - > #endif /* dl-procinfo.h */ > diff --git a/sysdeps/x86/dl-procinfo.h b/sysdeps/x86/dl-procinfo.h > index 3902925be4..b2184b8f5d 100644 > --- a/sysdeps/x86/dl-procinfo.h > +++ b/sysdeps/x86/dl-procinfo.h > @@ -30,19 +30,4 @@ > #define _DL_HWCAP_PLATFORM (((1ULL << _DL_PLATFORMS_COUNT) - 1) \ > << _DL_FIRST_PLATFORM) > > -static inline int > -__attribute__ ((unused, always_inline)) > -_dl_string_platform (const char *str) > -{ > - int i; > - > - if (str != NULL) > - for (i = HWCAP_PLATFORMS_START; i < HWCAP_PLATFORMS_COUNT; ++i) > - { > - if (strcmp (str, GLRO(dl_x86_platforms)[i]) == 0) > - return _DL_FIRST_PLATFORM + i; > - } > - return -1; > -}; > - > #endif /* dl-procinfo.h */