about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--elf/rtld.c1
-rw-r--r--sysdeps/generic/dl-sysdep.c2
3 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3c9c959fd1..3d41441f0b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2004-02-27  Jakub Jelinek  <jakub@redhat.com>
 
+	* elf/rtld.c (dl_main): Adjust l->l_ld of the vDSO by l->l_addr.
+	* sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): Only set
+	GL(dl_sysinfo) if non-zero.
+
 	* sysdeps/unix/sysv/linux/sysconf.c: Include stdlib.h.
 
 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
diff --git a/elf/rtld.c b/elf/rtld.c
index a6910e5161..87a86bed32 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -1246,6 +1246,7 @@ ERROR: ld.so: object '%s' from %s cannot be preloaded: ignored.\n",
 	  l->l_map_start = (ElfW(Addr)) GL(dl_sysinfo_dso);
 	  l->l_addr = l->l_map_start - l->l_addr;
 	  l->l_map_end += l->l_addr;
+	  l->l_ld = (void *) ((ElfW(Addr)) l->l_ld + l->l_addr);
 	  elf_get_dynamic_info (l, dyn_temp);
 	  _dl_setup_hash (l);
 	  l->l_relocated = 1;
diff --git a/sysdeps/generic/dl-sysdep.c b/sysdeps/generic/dl-sysdep.c
index b95c02d92f..bdd7326c58 100644
--- a/sysdeps/generic/dl-sysdep.c
+++ b/sysdeps/generic/dl-sysdep.c
@@ -201,7 +201,7 @@ _dl_sysdep_start (void **start_argptr,
 
 #if defined NEED_DL_SYSINFO
   /* Only set the sysinfo value if we also have the vsyscall DSO.  */
-  if (GL(dl_sysinfo_dso) != 0)
+  if (GL(dl_sysinfo_dso) != 0 && new_sysinfo)
     GL(dl_sysinfo) = new_sysinfo;
 #endif