diff mbox series

rtld: Move architecture specific struct last in _rtld_global_ro (BZ #32279)

Message ID PAWPR08MB8982A5ECDE187214A033C7E283472@PAWPR08MB8982.eurprd08.prod.outlook.com
State New
Headers show
Series rtld: Move architecture specific struct last in _rtld_global_ro (BZ #32279) | expand

Commit Message

Wilco Dijkstra Oct. 17, 2024, 3:07 p.m. UTC
Move architecture specific fields from dl-procinfo last in _rtld_global_ro. 
This avoid minor changes in architecture specific code accidentally changing the layout.

Passes regress, OK for commit?

---
diff mbox series

Patch

diff --git a/elf/rtld.c b/elf/rtld.c
index cb6b61d5705c438f2c017de6fb110b2851bfe06d..1e457567c29cbafb6de442df47ad09a91bf87b65 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -350,8 +350,6 @@  extern struct rtld_global _rtld_local
    read-only after relocation.  */
 struct rtld_global_ro _rtld_global_ro attribute_relro =
   {
-    /* Get architecture specific initializer.  */
-#include <dl-procinfo.c>
 #ifdef NEED_DL_SYSINFO
     ._dl_sysinfo = DL_SYSINFO_DEFAULT,
 #endif
@@ -372,6 +370,9 @@  struct rtld_global_ro _rtld_global_ro attribute_relro =
     ._dl_error_free = _dl_error_free,
     ._dl_tls_get_addr_soft = _dl_tls_get_addr_soft,
     ._dl_libc_freeres = __rtld_libc_freeres,
+
+    /* Get architecture specific initializer.  */
+#include <dl-procinfo.c>
   };
 /* If we would use strong_alias here the compiler would see a
    non-hidden definition.  This would undo the effect of the previous