This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
A dl-close.c patch
- To: drepper@cygnus.com (Ulrich Drepper)
- Subject: A dl-close.c patch
- From: hjl@lucon.org (H.J. Lu)
- Date: Wed, 2 Sep 1998 13:13:48 -0700 (PDT)
- Cc: libc-hacker@cygnus.com (GNU C Library)
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;