[committed] Fix linker-debugger interface

Gary Benson gbenson@redhat.com
Fri Aug 17 10:52:00 GMT 2012


Carlos O'Donell wrote:
> On 8/16/2012 12:33 PM, Roland McGrath wrote:
> > > 2012-08-16  Gary Benson  <gbenson@redhat.com>
> > >
> > > 	* elf/dl-close.c (_dl_close_worker): Also set r->r_map when
> > >           unmapping the first object in a namespace.
> > 
> > The second line should be intended with just one tab, so it lines
> > up under the * of the first line.

Ah, this is what happens when you update ChangeLogs in diff-mode :)

> > Otherwise the change is fine.
> 
> I reviewed _dl_close_worker and the change looks correct.
> 
> I've often wondered if r_debug is correct in all cases and here's
> a case where it isn't.

This error was hidden previously as it only happens in namespaces
other than LM_ID_BASE, which were not visible through the original
interface.

> Are you able to check this in yourself?

Yes, thank you, I have done so.

Thanks,
Gary

-- 
http://gbenson.net/
-------------- next part --------------
diff --git a/ChangeLog b/ChangeLog
index 6cb87f2..ba4ea36 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-08-16  Gary Benson  <gbenson@redhat.com>
+
+	* elf/dl-close.c (_dl_close_worker): Also set r->r_map when
+	unmapping the first object in a namespace.
+
 2012-08-16  Roland McGrath  <roland@hack.frob.com>
 
 	* inet/getnetgrent_r.c (internal_setnetgrent): Renamed to ...
diff --git a/elf/dl-close.c b/elf/dl-close.c
index 45b2187..216bd81 100644
--- a/elf/dl-close.c
+++ b/elf/dl-close.c
@@ -641,7 +641,7 @@ _dl_close_worker (struct link_map *map)
 #ifdef SHARED
 	      assert (nsid != LM_ID_BASE);
 #endif
-	      ns->_ns_loaded = imap->l_next;
+	      r->r_map = ns->_ns_loaded = imap->l_next;
 	    }
 
 	  --ns->_ns_nloaded;


More information about the Libc-alpha mailing list