]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Don't try to free rpath strings allocated during startup
authorAndreas Schwab <schwab@redhat.com>
Wed, 15 Sep 2010 14:20:57 +0000 (07:20 -0700)
committerUlrich Drepper <drepper@redhat.com>
Wed, 15 Sep 2010 14:20:57 +0000 (07:20 -0700)
ChangeLog
elf/dl-load.c
elf/dl-support.c
elf/rtld.c

index b9974053a73ee23506afd7944f70e71d2ed66a58..269bede7fc617a6e653a71ee03be9ba348876730 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2010-09-13  Andreas Schwab  <schwab@redhat.com>
+           Ulrich Drepper  <drepper@redhat.com>
+
+       * elf/rtld.c (dl_main): Set GLRO(dl_init_all_dirs) just before
+       re-relocationg ld.so.
+       * elf/dl-support.c (_dl_non_dynamic_init): And here after the
+       _dl_init_paths call.
+       * elf/dl-load.c (_dl_init_paths).  Don't set GLRO(dl_init_all_dirs)
+       here anymore.
+
 2010-09-14  Ulrich Drepper  <drepper@redhat.com>
 
        * resolv/res_init.c (__res_vinit): Count the default server we added.
index 0adddf5aaa2008c5c2ee91fd4b96489605581baa..a7162eb77de7a538235a4326d0eb9ccb5b244c01 100644 (file)
@@ -787,9 +787,6 @@ _dl_init_paths (const char *llp)
     }
   else
     env_path_list.dirs = (void *) -1;
-
-  /* Remember the last search directory added at startup.  */
-  GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
 }
 
 
index f94d2c4c6e0e095755a53eed217a361b7b6e9806..5897b32e8c3e5c5ad35b9f6b9f73811da11aec98 100644 (file)
@@ -264,6 +264,9 @@ _dl_non_dynamic_init (void)
      objects.  */
   _dl_init_paths (getenv ("LD_LIBRARY_PATH"));
 
+  /* Remember the last search directory added at startup.  */
+  _dl_init_all_dirs = GL(dl_all_dirs);
+
   _dl_lazy = *(getenv ("LD_BIND_NOW") ?: "") == '\0';
 
   _dl_bind_not = *(getenv ("LD_BIND_NOT") ?: "") != '\0';
index 90f3ff126eb910fa90f6361726fec97c1370fc85..5ecc4fe711c0a2d1b8c3d0186917cf7ac3b799be 100644 (file)
@@ -2291,6 +2291,10 @@ 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.