]> sourceware.org Git - glibc.git/commitdiff
Tue Jul 2 10:44:37 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
authorRoland McGrath <roland@gnu.org>
Tue, 2 Jul 1996 22:18:48 +0000 (22:18 +0000)
committerRoland McGrath <roland@gnu.org>
Tue, 2 Jul 1996 22:18:48 +0000 (22:18 +0000)
* elf/rtld.c (dl_main): Set _dl_rtld_map's DT_DEBUG location too.

elf/rtld.c

index 1cabe82660bbbf798ac084b1bc71e7fe95833c11..8ec637f6a823def08449a6859c151934e31364c6 100644 (file)
@@ -368,6 +368,11 @@ of this helper program; chances are you did not intend to run this program.\n",
         with the run-time address of the r_debug structure  */
       l->l_info[DT_DEBUG]->d_un.d_ptr = (ElfW(Addr)) r;
 
+    /* Fill in the pointer in the dynamic linker's own dynamic section, in
+       case you run gdb on the dynamic linker directly.  */
+    if (_dl_rtld_map.l_info[DT_DEBUG])
+      _dl_rtld_map.l_info[DT_DEBUG]->d_un.d_ptr = (ElfW(Addr)) r;
+
     /* Notify the debugger that all objects are now mapped in.  */
     r->r_state = RT_ADD;
     _dl_debug_state ();
This page took 0.043538 seconds and 5 git commands to generate.