]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
elf: Remove _dl_string_platform
authorStefan Liebler <stli@linux.ibm.com>
Fri, 7 Jun 2024 11:42:38 +0000 (13:42 +0200)
committerStefan Liebler <stli@linux.ibm.com>
Tue, 18 Jun 2024 08:45:36 +0000 (10:45 +0200)
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.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
elf/dl-diagnostics.c
sysdeps/alpha/dl-procinfo.h
sysdeps/csky/dl-procinfo.h
sysdeps/generic/dl-procinfo.h
sysdeps/mips/dl-procinfo.h
sysdeps/s390/dl-procinfo.h
sysdeps/sparc/dl-procinfo.h
sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h
sysdeps/unix/sysv/linux/arm/dl-procinfo.h
sysdeps/x86/dl-procinfo.h

index aaf67b87e81b04c8cdc041fed6e1705fe2f941a7..e69463b2bdaffb8080a77fbba52d94f2b172887d 100644 (file)
@@ -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);
index f1e2e98e081c81842385aa627063d85396f4d7db..bc4db868a9f59acafb28f7d6f45a27bd5e65fb52 100644 (file)
 
 #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
 
index 77621e4b20ed1445a62952bff6c16be060a6c229..a54e8de4464481e7ff7d6a799a3707989414a885 100644 (file)
 
 #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
 
index c4818497c805aa737eb08e66b1805721e9934bef..00e1ae7b2f3dcdda94e6fe618461db8627a01221 100644 (file)
@@ -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 */
index 6655e68f546f078d4b47bc5bb312c0c3b401e730..319943439084b5ec97b5528ee31a24496b973664 100644 (file)
 
 #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
 
index 38e77f7ad9858701afff2752ceb6061a4c089e76..ffeb655ad0c59799cfccd8c91796c715b0732820 100644 (file)
@@ -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 */
index 61cd296de06f2c037a76b11c0428fee61740c180..dbb1a4d324e2bcf0fe4f6d8aa03d793b1ee93339 100644 (file)
@@ -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 */
index 6a3fb78c47360385f26e813ca62aa12ea15f708d..0ed89c5e41831b67b5208dce6dedbff14e492e57 100644 (file)
@@ -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 */
index 49cf0008b292034298404db437b9432b1c8208fc..2a1c5985eecc6d46a0c4f42720711dd83f4e9e1a 100644 (file)
@@ -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 */
index 3902925be486e62b3df14c2515608c959cbf9e80..b2184b8f5d7e4912e39c3172eaea1895303b5b10 100644 (file)
 #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 */