about summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-02-12 10:01:55 +0000
committerJakub Jelinek <jakub@redhat.com>2005-02-12 10:01:55 +0000
commit231d429bea9a9e68fb58e3c5d7585ed31e4c1901 (patch)
treeaab71e9b19e276969264e11d28be6231a3fa711e /elf
parent8a581cc8cf94f76ce9ad9f45c63eee94b40f8052 (diff)
downloadglibc-231d429bea9a9e68fb58e3c5d7585ed31e4c1901.tar.gz
glibc-231d429bea9a9e68fb58e3c5d7585ed31e4c1901.tar.xz
glibc-231d429bea9a9e68fb58e3c5d7585ed31e4c1901.zip
* elf/rtld.c (dlmain): If LD_TRACE_PRELINKING, clear l_relocated flag
	before relocating ld.so again.
Diffstat (limited to 'elf')
-rw-r--r--elf/rtld.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/elf/rtld.c b/elf/rtld.c
index 2c42336f14..b72216ba96 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -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)
 	    {