about summary refs log tree commit diff
path: root/elf/dl-lookup.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-lookup.c
parent1b4575aefaaa43adfed4658f7d66de587f12120e (diff)
downloadglibc-d6b5d570a3255d8dc80e07c3674594574cd98fe7.tar.gz
glibc-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.
Diffstat (limited to 'elf/dl-lookup.c')
-rw-r--r--elf/dl-lookup.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index ae8df270e9..f10ff4739d 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -59,12 +59,11 @@ struct sym_val
     result;								      \
   })
 
-#ifdef SHARED
 /* Statistics function.  */
-unsigned long int _dl_num_relocations;
-# define bump_num_relocation() ++_dl_num_relocations
+#ifdef SHARED
+# define bump_num_relocations() ++GL(dl_num_relocations)
 #else
-# define bump_num_relocation() ((void) 0)
+# define bump_num_relocations() ((void) 0)
 #endif
 
 
@@ -122,7 +121,7 @@ add_dependency (struct link_map *undef_map, struct link_map *map)
      reference is still available.  There is a brief period in
      which the object could have been removed since we found the
      definition.  */
-  runp = _dl_loaded;
+  runp = GL(dl_loaded);
   while (runp != NULL && runp != map)
     runp = runp->l_next;
 
@@ -168,7 +167,7 @@ add_dependency (struct link_map *undef_map, struct link_map *map)
 	  ++(*list)->l_opencount;
 
       /* Display information if we are debugging.  */
-      if (__builtin_expect (_dl_debug_mask & DL_DEBUG_FILES, 0))
+      if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_FILES, 0))
 	_dl_debug_printf ("\
 \nfile=%s;  needed by %s (relocation dependency)\n\n",
 			  map->l_name[0] ? map->l_name : _dl_argv[0],
@@ -281,7 +280,7 @@ _dl_lookup_symbol (const char *undef_name, struct link_map *undef_map,
 	}
     }
 
-  if (__builtin_expect (_dl_debug_mask
+  if (__builtin_expect (GL(dl_debug_mask)
 			& (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0))
     _dl_debug_bindings (undef_name, undef_map, ref, symbol_scope,
 			&current_value, NULL, type_class, protected);
@@ -352,7 +351,7 @@ _dl_lookup_symbol_skip (const char *undef_name,
 	}
     }
 
-  if (__builtin_expect (_dl_debug_mask
+  if (__builtin_expect (GL(dl_debug_mask)
 			& (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0))
     _dl_debug_bindings (undef_name, undef_map, ref, symbol_scope,
 			&current_value, NULL, 0, protected);
@@ -471,7 +470,7 @@ _dl_lookup_versioned_symbol (const char *undef_name,
 	}
     }
 
-  if (__builtin_expect (_dl_debug_mask
+  if (__builtin_expect (GL(dl_debug_mask)
 			& (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0))
     _dl_debug_bindings (undef_name, undef_map, ref, symbol_scope,
 			&current_value, version, type_class, protected);
@@ -557,7 +556,7 @@ _dl_lookup_versioned_symbol_skip (const char *undef_name,
 	}
     }
 
-  if (__builtin_expect (_dl_debug_mask
+  if (__builtin_expect (GL(dl_debug_mask)
 			& (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0))
     _dl_debug_bindings (undef_name, undef_map, ref, symbol_scope,
 			&current_value, version, 0, protected);
@@ -596,7 +595,7 @@ _dl_debug_bindings (const char *undef_name, struct link_map *undef_map,
 {
   const char *reference_name = undef_map->l_name;
 
-  if (_dl_debug_mask & DL_DEBUG_BINDINGS)
+  if (GL(dl_debug_mask) & DL_DEBUG_BINDINGS)
     {
       _dl_debug_printf ("binding file %s to %s: %s symbol `%s'",
 			(reference_name[0]
@@ -610,14 +609,14 @@ _dl_debug_bindings (const char *undef_name, struct link_map *undef_map,
 	_dl_debug_printf_c ("\n");
     }
 #ifdef SHARED
-  if (_dl_debug_mask & DL_DEBUG_PRELINK)
+  if (GL(dl_debug_mask) & DL_DEBUG_PRELINK)
     {
       int conflict = 0;
       struct sym_val val = { NULL, NULL };
 
-      if ((_dl_trace_prelink_map == NULL
-	   || _dl_trace_prelink_map == _dl_loaded)
-	  && undef_map != _dl_loaded)
+      if ((GL(dl_trace_prelink_map) == NULL
+	   || GL(dl_trace_prelink_map) == GL(dl_loaded))
+	  && undef_map != GL(dl_loaded))
 	{
 	  const unsigned long int hash = _dl_elf_hash (undef_name);
 
@@ -634,8 +633,8 @@ _dl_debug_bindings (const char *undef_name, struct link_map *undef_map,
 	}
 
       if (conflict
-	  || _dl_trace_prelink_map == undef_map
-	  || _dl_trace_prelink_map == NULL)
+	  || GL(dl_trace_prelink_map) == undef_map
+	  || GL(dl_trace_prelink_map) == NULL)
 	{
 	  _dl_printf ("%s 0x%0*Zx 0x%0*Zx -> 0x%0*Zx 0x%0*Zx ",
 		      conflict ? "conflict" : "lookup",