]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* elf/rtld.c (dlmain): If LD_TRACE_PRELINKING, clear l_relocated flag
authorJakub Jelinek <jakub@redhat.com>
Sat, 12 Feb 2005 10:01:55 +0000 (10:01 +0000)
committerJakub Jelinek <jakub@redhat.com>
Sat, 12 Feb 2005 10:01:55 +0000 (10:01 +0000)
before relocating ld.so again.

ChangeLog
elf/rtld.c

index be37c4732a610f45c08e386317baef74effa04c4..b762bd97c189769dbc8ce6b0d1b359f290db7d1d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-02-12  Jakub Jelinek  <jakub@redhat.com>
+
+       * elf/rtld.c (dlmain): If LD_TRACE_PRELINKING, clear l_relocated flag
+       before relocating ld.so again.
+
 2005-02-11  Jakub Jelinek  <jakub@redhat.com>
 
        * debug/chk_fail.c (__chk_fail): Add a while (1) loop around
index 2c42336f14a0f164c5153c93dd2739567f070825..b72216ba9676a9d5d39e1730582b29a5d5867532 100644 (file)
@@ -2027,10 +2027,13 @@ ERROR: ld.so: object '%s' from %s cannot be preloaded: ignored.\n",
 
              if ((GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
                  && GL(dl_rtld_map).l_opencount > 1)
-               _dl_relocate_object (&GL(dl_rtld_map), main_map->l_scope,
-                                    0, 0);
-           }
-
+               {
+                 /* Mark the link map as not yet relocated again.  */
+                 GL(dl_rtld_map).l_relocated = 0;
+                 _dl_relocate_object (&GL(dl_rtld_map), main_map->l_scope,
+                                      0, 0);
+               }
+            }
 #define VERNEEDTAG (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (DT_VERNEED))
          if (version_info)
            {