aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-close.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-01-31 03:41:25 +0000
committerUlrich Drepper <drepper@redhat.com>2002-01-31 03:41:25 +0000
commitd6b5d570a3255d8dc80e07c3674594574cd98fe7 (patch)
tree36e05b0d065614559820d2a4f43bb1076ea5cfa1 /elf/dl-close.c
parent1b4575aefaaa43adfed4658f7d66de587f12120e (diff)
downloadglibc-d6b5d570a3255d8dc80e07c3674594574cd98fe7.tar
glibc-d6b5d570a3255d8dc80e07c3674594574cd98fe7.tar.gz
glibc-d6b5d570a3255d8dc80e07c3674594574cd98fe7.tar.bz2
glibc-d6b5d570a3255d8dc80e07c3674594574cd98fe7.zip
Update.
2002-01-30 Ulrich Drepper <drepper@redhat.com> * Versions.def [ld]: Add GLIBC_2.3. * elf/dl-addr.c: Move global variables for SHARED code in struct _rtld_global. Export this struct, remove all exports for the signal variables. * elf/dl-close.c: Likewise. * elf/dl-conflict.c: Likewise. * elf/dl-debug.c: Likewise. * elf/dl-deps.c: Likewise. * elf/dl-dst.h: Likewise. * elf/dl-error.c: Likewise. * elf/dl-fini.c: Likewise. * elf/dl-init.c: Likewise. * elf/dl-iteratephdr.c: Likewise. * elf/dl-libc.c: Likewise. * elf/dl-load.c: Likewise. * elf/dl-lookup.c: Likewise. * elf/dl-minimal.c: Likewise. * elf/dl-object.c: Likewise. * elf/dl-open.c: Likewise. * elf/dl-profile.c: Likewise. * elf/dl-profstub.c: Likewise. * elf/dl-reloc.c: Likewise. * elf/dl-runtime.c: Likewise. * elf/dl-support.c: Likewise. * elf/dl-sym.c: Likewise. * elf/dl-version.c: Likewise. * elf/do-lookup.h: Likewise. * elf/do-rel.h: Likewise. * elf/dynamic-link.h: Likewise. * elf/rtld.c: Likewise. * sysdeps/generic/dl-cache.c: Likewise. * sysdeps/generic/dl-sysdep.c: Likewise. * sysdeps/generic/ldsodefs.h: Likewise. * sysdeps/generic/libc-start.c: Likewise. * sysdeps/i386/dl-machine.h: Likewise. * sysdeps/ia64/dl-fptr.c: Likewise. * sysdeps/ia64/dl-machine.h: Likewise. * sysdeps/unix/sysv/linux/dl-librecon.h: Likewise. * sysdeps/unix/sysv/linux/dl-origin.c: Likewise. * sysdeps/unix/sysv/linux/dl-osinfo.h: Likewise. * sysdeps/unix/sysv/linux/getclktck.c: Likewise. * sysdeps/unix/sysv/linux/getpagesize.c: Likewise. * sysdeps/unix/sysv/linux/i386/dl-librecon.h: Likewise. * sysdeps/unix/sysv/linux/ia64/dl-static.c: Likewise. * sysdeps/unix/sysv/linux/ia64/getpagesize.c: Likewise. * malloc/thread-m.h: Spinlock definitions for x86/x86_64.
Diffstat (limited to 'elf/dl-close.c')
-rw-r--r--elf/dl-close.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/elf/dl-close.c b/elf/dl-close.c
index de4b91ac03..cece96b7fb 100644
--- a/elf/dl-close.c
+++ b/elf/dl-close.c
@@ -1,5 +1,5 @@
/* Close a shared object opened by `_dl_open'.
- Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
+ Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -63,7 +63,7 @@ _dl_close (void *_map)
if (map->l_opencount > 1 || map->l_type != lt_loaded)
{
/* There are still references to this object. Do nothing more. */
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_FILES, 0))
+ if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_FILES, 0))
_dl_debug_printf ("\nclosing file=%s; opencount == %u\n",
map->l_name, map->l_opencount);
@@ -125,7 +125,7 @@ _dl_close (void *_map)
&& imap->l_init_called)
{
/* When debugging print a message first. */
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_IMPCALLS, 0))
+ if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0))
_dl_debug_printf ("\ncalling fini: %s\n\n", imap->l_name);
/* Call its termination function. */
@@ -192,18 +192,18 @@ _dl_close (void *_map)
if (__builtin_expect (imap->l_global, 0))
{
/* This object is in the global scope list. Remove it. */
- unsigned int cnt = _dl_main_searchlist->r_nlist;
+ unsigned int cnt = GL(dl_main_searchlist)->r_nlist;
do
--cnt;
- while (_dl_main_searchlist->r_list[cnt] != imap);
+ while (GL(dl_main_searchlist)->r_list[cnt] != imap);
/* The object was already correctly registered. */
- while (++cnt < _dl_main_searchlist->r_nlist)
- _dl_main_searchlist->r_list[cnt - 1]
- = _dl_main_searchlist->r_list[cnt];
+ while (++cnt < GL(dl_main_searchlist)->r_nlist)
+ GL(dl_main_searchlist)->r_list[cnt - 1]
+ = GL(dl_main_searchlist)->r_list[cnt];
- --_dl_main_searchlist->r_nlist;
+ --GL(dl_main_searchlist)->r_nlist;
}
/* We can unmap all the maps at once. We determined the
@@ -221,9 +221,9 @@ _dl_close (void *_map)
if (imap->l_prev != NULL)
imap->l_prev->l_next = imap->l_next;
else
- _dl_loaded = imap->l_next;
+ GL(dl_loaded) = imap->l_next;
#endif
- --_dl_nloaded;
+ --GL(dl_nloaded);
if (imap->l_next)
imap->l_next->l_prev = imap->l_prev;
@@ -305,17 +305,17 @@ _dl_close (void *_map)
static void
free_mem (void)
{
- if (__builtin_expect (_dl_global_scope_alloc, 0) != 0
- && _dl_main_searchlist->r_nlist == _dl_initial_searchlist.r_nlist)
+ if (__builtin_expect (GL(dl_global_scope_alloc), 0) != 0
+ && GL(dl_main_searchlist)->r_nlist == GL(dl_initial_searchlist).r_nlist)
{
/* All object dynamically loaded by the program are unloaded. Free
the memory allocated for the global scope variable. */
- struct link_map **old = _dl_main_searchlist->r_list;
+ struct link_map **old = GL(dl_main_searchlist)->r_list;
/* Put the old map in. */
- _dl_main_searchlist->r_list = _dl_initial_searchlist.r_list;
+ GL(dl_main_searchlist)->r_list = GL(dl_initial_searchlist).r_list;
/* Signal that the original map is used. */
- _dl_global_scope_alloc = 0;
+ GL(dl_global_scope_alloc) = 0;
/* Now free the old map. */
free (old);