about summary refs log tree commit diff
path: root/sysdeps/s390/dl-procinfo.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2022-08-25 16:34:20 +0200
committerFlorian Weimer <fweimer@redhat.com>2022-08-25 21:33:12 +0200
commit5ecc98241229d494aaad23a4a3fe106fe11e1f40 (patch)
tree96d65b3208bb8ce7b0cc2ff41571d09d761e1623 /sysdeps/s390/dl-procinfo.h
parent89baed0b93639180fd7d0ba922873b003649c7af (diff)
downloadglibc-5ecc98241229d494aaad23a4a3fe106fe11e1f40.tar.gz
glibc-5ecc98241229d494aaad23a4a3fe106fe11e1f40.tar.xz
glibc-5ecc98241229d494aaad23a4a3fe106fe11e1f40.zip
s390: Move hwcaps/platform names out of _rtld_global_ro
Changes to these arrays are often backported to stable releases,
but additions to these arrays shift the offsets of the following
_rltd_global_ro members, thus breaking the GLIBC_PRIVATE ABI.

Obviously, this change is itself an internal ABI break, but at least
it will avoid further ABI breaks going forward.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/s390/dl-procinfo.h')
-rw-r--r--sysdeps/s390/dl-procinfo.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/sysdeps/s390/dl-procinfo.h b/sysdeps/s390/dl-procinfo.h
index 1f4e3875ba..e1f88b9ab7 100644
--- a/sysdeps/s390/dl-procinfo.h
+++ b/sysdeps/s390/dl-procinfo.h
@@ -21,8 +21,10 @@
 #include <ldsodefs.h>
 
 #define _DL_HWCAP_COUNT 23
+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
@@ -78,7 +80,7 @@ static inline const char *
 __attribute__ ((unused))
 _dl_hwcap_string (int idx)
 {
-  return GLRO(dl_s390_cap_flags)[idx];
+  return _dl_s390_cap_flags[idx];
 };
 
 static inline int
@@ -89,7 +91,7 @@ _dl_string_hwcap (const char *str)
 
   for (i = 0; i < _DL_HWCAP_COUNT; i++)
     {
-      if (strcmp (str, GLRO(dl_s390_cap_flags)[i]) == 0)
+      if (strcmp (str, _dl_s390_cap_flags[i]) == 0)
 	return i;
     }
   return -1;
@@ -104,7 +106,7 @@ _dl_string_platform (const char *str)
   if (str != NULL)
     for (i = 0; i < _DL_PLATFORMS_COUNT; ++i)
       {
-	if (strcmp (str, GLRO(dl_s390_platforms)[i]) == 0)
+	if (strcmp (str, _dl_s390_platforms[i]) == 0)
 	  return _DL_FIRST_PLATFORM + i;
       }
   return -1;