aboutsummaryrefslogtreecommitdiff
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
parent1b4575aefaaa43adfed4658f7d66de587f12120e (diff)
downloadglibc-d6b5d570a3255d8dc80e07c3674594574cd98fe7.tar.xz
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.
-rw-r--r--ChangeLog49
-rw-r--r--Versions.def1
-rw-r--r--elf/Versions27
-rw-r--r--elf/dl-addr.c4
-rw-r--r--elf/dl-close.c32
-rw-r--r--elf/dl-conflict.c27
-rw-r--r--elf/dl-debug.c4
-rw-r--r--elf/dl-deps.c20
-rw-r--r--elf/dl-dst.h4
-rw-r--r--elf/dl-error.c2
-rw-r--r--elf/dl-fini.c20
-rw-r--r--elf/dl-init.c15
-rw-r--r--elf/dl-iteratephdr.c4
-rw-r--r--elf/dl-libc.c8
-rw-r--r--elf/dl-load.c98
-rw-r--r--elf/dl-lookup.c33
-rw-r--r--elf/dl-minimal.c9
-rw-r--r--elf/dl-object.c12
-rw-r--r--elf/dl-open.c52
-rw-r--r--elf/dl-profile.c23
-rw-r--r--elf/dl-profstub.c6
-rw-r--r--elf/dl-reloc.c18
-rw-r--r--elf/dl-runtime.c6
-rw-r--r--elf/dl-support.c29
-rw-r--r--elf/dl-sym.c26
-rw-r--r--elf/dl-version.c17
-rw-r--r--elf/do-lookup.h4
-rw-r--r--elf/do-rel.h8
-rw-r--r--elf/dynamic-link.h7
-rw-r--r--elf/rtld.c320
-rw-r--r--malloc/thread-m.h61
-rw-r--r--sysdeps/generic/dl-cache.c17
-rw-r--r--sysdeps/generic/dl-sysdep.c29
-rw-r--r--sysdeps/generic/ldsodefs.h168
-rw-r--r--sysdeps/generic/libc-start.c6
-rw-r--r--sysdeps/i386/dl-machine.h18
-rw-r--r--sysdeps/ia64/dl-fptr.c5
-rw-r--r--sysdeps/ia64/dl-machine.h8
-rw-r--r--sysdeps/unix/sysv/linux/dl-librecon.h2
-rw-r--r--sysdeps/unix/sysv/linux/dl-origin.c9
-rw-r--r--sysdeps/unix/sysv/linux/dl-osinfo.h4
-rw-r--r--sysdeps/unix/sysv/linux/getclktck.c8
-rw-r--r--sysdeps/unix/sysv/linux/getpagesize.c10
-rw-r--r--sysdeps/unix/sysv/linux/i386/dl-librecon.h12
-rw-r--r--sysdeps/unix/sysv/linux/ia64/dl-static.c4
-rw-r--r--sysdeps/unix/sysv/linux/ia64/getpagesize.c7
46 files changed, 680 insertions, 573 deletions
diff --git a/ChangeLog b/ChangeLog
index e99d50a971..7edb033730 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,51 @@
+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.
+
2002-01-29 Ulrich Drepper <drepper@redhat.com>
* sysdeps/ia64/dl-lookupcfg.h (DL_AUTO_FUNCTION_ADDRESS): Add cast
@@ -33,6 +81,7 @@
* malloc/malloc.c: Rewrite, adapted from Doug Lea's malloc-2.7.0.c.
* malloc/malloc.h: Likewise.
+ * malloc/thread-m.h: Spinlock definitions for x86/x86_64.
* malloc/arena.c: New file.
* malloc/hooks.c: New file.
* malloc/tst-mallocstate.c: New file.
diff --git a/Versions.def b/Versions.def
index a5829cf98c..e89a34cf90 100644
--- a/Versions.def
+++ b/Versions.def
@@ -97,6 +97,7 @@ ld {
GLIBC_2.2
GLIBC_2.2.1
GLIBC_2.2.3
+ GLIBC_2.3
}
libthread_db {
GLIBC_2.1.3
diff --git a/elf/Versions b/elf/Versions
index 0c3480450f..5c8da22843 100644
--- a/elf/Versions
+++ b/elf/Versions
@@ -35,12 +35,12 @@ ld {
# Those are in the dynamic linker, but used by libc.so.
__libc_enable_secure; _dl_catch_error; _dl_check_all_versions;
- _dl_debug_initialize; _dl_debug_state; _dl_default_scope;
- _dl_global_scope_end; _dl_lookup_symbol;
+ _dl_debug_initialize; _dl_debug_state;
+ _dl_lookup_symbol;
_dl_map_object; _dl_map_object_deps; _dl_object_relocation_scope;
_dl_relocate_object; _dl_signal_error; _dl_starting_up;
_dl_sysdep_start; _r_debug;
- _dl_global_scope; _dl_lookup_symbol_skip;
+ _dl_lookup_symbol_skip;
_dl_lookup_versioned_symbol; _dl_lookup_versioned_symbol_skip;
# Function from libc.so which must be shared with libc.
@@ -48,31 +48,28 @@ ld {
}
GLIBC_2.1 {
# global variables
- _dl_profile; _dl_profile_map; _dl_profile_output; _dl_start_profile;
- _dl_loaded; _dl_main_searchlist; _dl_fpu_control; _dl_initial_searchlist;
- _dl_global_scope_alloc; __libc_stack_end;
+ _dl_fpu_control; __libc_stack_end;
# functions used in other libraries
- _dl_mcount; _dl_unload_cache;
+ _dl_start_profile; _dl_mcount; _dl_unload_cache;
}
GLIBC_2.1.1 {
# global variables
- _dl_lazy; _dl_origin_path; _dl_platformlen;
+ _dl_lazy;
# functions used in other libraries
_dl_dst_count; _dl_dst_substitute;
}
GLIBC_2.2 {
- _dl_init; _dl_load_lock; _dl_argv; _dl_nloaded; _dl_check_map_versions;
-
- # this is defined in ld.so and overridden by libc
- _dl_init_first;
+ _dl_init; _dl_load_lock; _dl_argv; _dl_check_map_versions;
# variables used elsewhere
- _dl_out_of_memory; _dl_all_dirs; _dl_init_all_dirs;
- _dl_clktck; _dl_pagesize;
+ _dl_out_of_memory;
}
GLIBC_2.2.3 {
- _dl_debug_mask; _dl_debug_printf;
+ _dl_debug_printf;
+ }
+ GLIBC_2.3 {
+ _rtld_global;
}
}
diff --git a/elf/dl-addr.c b/elf/dl-addr.c
index ebb62858e6..59f1a430b5 100644
--- a/elf/dl-addr.c
+++ b/elf/dl-addr.c
@@ -1,5 +1,5 @@
/* Locate the shared object symbol nearest a given address.
- Copyright (C) 1996-2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1996-2000, 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
@@ -34,7 +34,7 @@ _dl_addr (const void *address, Dl_info *info)
/* Find the highest-addressed object that ADDRESS is not below. */
match = NULL;
- for (l = _dl_loaded; l; l = l->l_next)
+ for (l = GL(dl_loaded); l; l = l->l_next)
if (addr >= l->l_map_start && addr < l->l_map_end)
{
/* We know ADDRESS lies within L if in any shared object.
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);
diff --git a/elf/dl-conflict.c b/elf/dl-conflict.c
index 0f863ac893..3e88e54021 100644
--- a/elf/dl-conflict.c
+++ b/elf/dl-conflict.c
@@ -1,5 +1,5 @@
/* Resolve conflicts against already prelinked libraries.
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2001.
@@ -28,13 +28,12 @@
#include <sys/types.h>
#include "dynamic-link.h"
-extern unsigned long int _dl_num_cache_relocations; /* in dl-lookup.c */
void
_dl_resolve_conflicts (struct link_map *l, ElfW(Rela) *conflict,
ElfW(Rela) *conflictend)
{
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_RELOC, 0))
+ if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_RELOC, 0))
_dl_printf ("\nconflict processing: %s\n",
l->l_name[0] ? l->l_name : _dl_argv[0]);
@@ -45,25 +44,21 @@ _dl_resolve_conflicts (struct link_map *l, ElfW(Rela) *conflict,
/* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code. */
#define RESOLVE_MAP(ref, version, flags) (*ref = NULL, 0)
#define RESOLVE(ref, version, flags) (*ref = NULL, 0)
-#define RESOLVE_CONFLICT_FIND_MAP(map, r_offset) \
-do \
- { \
- while ((resolve_conflict_map->l_map_end \
- < (ElfW(Addr))(r_offset)) \
- || (resolve_conflict_map->l_map_start \
- > (ElfW(Addr))(r_offset))) \
- resolve_conflict_map \
- = resolve_conflict_map->l_next; \
- (map) = resolve_conflict_map; \
+#define RESOLVE_CONFLICT_FIND_MAP(map, r_offset) \
+ do { \
+ while ((resolve_conflict_map->l_map_end < (ElfW(Addr)) (r_offset)) \
+ || (resolve_conflict_map->l_map_start > (ElfW(Addr)) (r_offset))) \
+ resolve_conflict_map = resolve_conflict_map->l_next; \
+ \
+ (map) = resolve_conflict_map; \
} while (0)
struct link_map *resolve_conflict_map __attribute__ ((__unused__))
- = _dl_loaded;
-
+ = GL(dl_loaded);
#include "dynamic-link.h"
- _dl_num_cache_relocations += conflictend - conflict;
+ GL(dl_num_cache_relocations) += conflictend - conflict;
for (; conflict < conflictend; ++conflict)
elf_machine_rela (l, conflict, NULL, NULL, (void *) conflict->r_offset);
diff --git a/elf/dl-debug.c b/elf/dl-debug.c
index 5a51b53357..4e8197227e 100644
--- a/elf/dl-debug.c
+++ b/elf/dl-debug.c
@@ -1,5 +1,5 @@
/* Communicate dynamic linker state to the debugger at runtime.
- Copyright (C) 1996, 1998, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998, 2000, 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
@@ -39,7 +39,7 @@ _dl_debug_initialize (ElfW(Addr) ldbase)