From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: Stefan Liebler <stli@linux.ibm.com>, libc-alpha@sourceware.org
Cc: fweimer@redhat.com, devel@otheo.eu, bergner@linux.ibm.com
Subject: Re: [RFC 3/9] elf: Remove _dl_string_platform
Date: Tue, 11 Jun 2024 16:09:58 -0300 [thread overview]
Message-ID: <c44b75e4-0865-46ca-9158-83846c7f7bb7@linaro.org> (raw)
In-Reply-To: <20240607114543.659306-4-stli@linux.ibm.com>
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 <adhemerval.zanella@linaro.org>
> ---
> 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 */
next prev parent reply other threads:[~2024-06-11 19:10 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-07 11:42 [RFC 0/9] Remove legacy platform bits and cleanups Stefan Liebler
2024-06-07 11:42 ` [RFC 1/9] x86: Remove HWCAP_START and HWCAP_COUNT Stefan Liebler
2024-06-11 18:14 ` Adhemerval Zanella Netto
2024-06-07 11:42 ` [RFC 2/9] elf: Remove loading legacy hwcaps/platform entries in dynamic loader Stefan Liebler
2024-06-11 18:57 ` Adhemerval Zanella Netto
2024-06-07 11:42 ` [RFC 3/9] elf: Remove _dl_string_platform Stefan Liebler
2024-06-11 19:09 ` Adhemerval Zanella Netto [this message]
2024-06-07 11:42 ` [RFC 4/9] elf: Remove platform strings in dl-procinfo.c Stefan Liebler
2024-06-11 19:20 ` Adhemerval Zanella Netto
2024-06-12 7:32 ` [V2] " Stefan Liebler
2024-06-14 12:58 ` Adhemerval Zanella Netto
2024-06-07 11:42 ` [RFC 5/9] elf: Remove _DL_HWCAP_PLATFORM Stefan Liebler
2024-06-11 19:28 ` Adhemerval Zanella Netto
2024-06-07 11:42 ` [RFC 6/9] elf: Remove _DL_FIRST_PLATFORM Stefan Liebler
2024-06-11 19:29 ` Adhemerval Zanella Netto
2024-06-07 11:42 ` [RFC 7/9] elf: Remove _DL_PLATFORMS_COUNT Stefan Liebler
2024-06-11 19:48 ` Adhemerval Zanella Netto
2024-06-07 11:42 ` [RFC 8/9] elf: Remove LD_HWCAP_MASK / tunable glibc.cpu.hwcap_mask Stefan Liebler
2024-06-11 20:04 ` Adhemerval Zanella Netto
2024-06-07 11:42 ` [RFC 9/9] elf: Remove HWCAP_IMPORTANT Stefan Liebler
2024-06-11 20:07 ` Adhemerval Zanella Netto
2024-06-07 12:18 ` [RFC 0/9] Remove legacy platform bits and cleanups Florian Weimer
2024-06-10 13:23 ` Stefan Liebler
2024-06-10 14:03 ` Florian Weimer
2024-06-11 12:24 ` Stefan Liebler
2024-06-08 11:09 ` Florian Weimer
2024-06-10 13:36 ` Stefan Liebler
2024-06-11 12:13 ` Stefan Liebler
2024-06-12 7:50 ` Stefan Liebler
2024-06-18 8:55 ` Stefan Liebler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c44b75e4-0865-46ca-9158-83846c7f7bb7@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=bergner@linux.ibm.com \
--cc=devel@otheo.eu \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=stli@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).