]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Don't try to write to _rtld_global_ro after performing relro protection
authorAndreas Schwab <schwab@redhat.com>
Tue, 28 Sep 2010 13:11:48 +0000 (15:11 +0200)
committerAndreas Schwab <schwab@redhat.com>
Tue, 28 Sep 2010 13:12:33 +0000 (15:12 +0200)
ChangeLog
elf/rtld.c

index 3351f49200478fa4ed6037be451945c7e4f1fa87..44886cf62f3e7699de73f298466869ae3d152d36 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-09-28  Andreas Schwab  <schwab@redhat.com>
+
+       * elf/rtld.c (dl_main): Move setting of GLRO(dl_init_all_dirs)
+       before performing relro protection.
+
 2010-09-27  Andreas Schwab  <schwab@redhat.com>
 
        * include/link.h (struct link_map): Add l_free_initfini.
index 9a560b3ced60daa7f0f52ca8b2191dbb0b2a5eec..201c9cf26bac129336b1dc5c685948c5f9308e6c 100644 (file)
@@ -2168,6 +2168,10 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
      we need it in the memory handling later.  */
   GLRO(dl_initial_searchlist) = *GL(dl_ns)[LM_ID_BASE]._ns_main_searchlist;
 
+  /* Remember the last search directory added at startup, now that
+     malloc will no longer be the one from dl-minimal.c.  */
+  GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
+
   if (prelinked)
     {
       if (main_map->l_info [ADDRIDX (DT_GNU_CONFLICT)] != NULL)
@@ -2288,10 +2292,6 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
                          lossage);
     }
 
-  /* Remember the last search directory added at startup, now that
-     malloc will no longer be the one from dl-minimal.c.  */
-  GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
-
   if (! prelinked && rtld_multiple_ref)
     {
       /* There was an explicit ref to the dynamic linker as a shared lib.