A dl-close.c patch

H.J. Lu hjl@lucon.org
Wed Sep 2 13:13:00 GMT 1998


How does this patch look? BTW, you need my new dl-open.c too.


-- 
H.J. Lu (hjl@gnu.org)
Index: dl-close.c
===================================================================
RCS file: /home/work/cvs/gnu/glibc/elf/dl-close.c,v
retrieving revision 1.1.1.13
diff -u -r1.1.1.13 dl-close.c
--- dl-close.c	1998/09/02 14:28:32	1.1.1.13
+++ dl-close.c	1998/09/02 20:13:00
@@ -131,7 +131,11 @@
 	  if (imap->l_prev != NULL)
 	    imap->l_prev->l_next = imap->l_next;
 	  else
-	    _dl_loaded = imap->l_next;
+	    {
+	      if (_dl_global_scope[2] == imap)
+		_dl_global_scope[2] = imap->l_next;
+	      _dl_loaded = imap->l_next;
+	    }
 #endif
 	  if (imap->l_next)
 	    imap->l_next->l_prev = imap->l_prev;



More information about the Libc-hacker mailing list