about summary refs log tree commit diff
path: root/elf/dl-lookup.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-09-06 09:16:53 +0000
committerUlrich Drepper <drepper@redhat.com>1998-09-06 09:16:53 +0000
commitbe93561004695198611aa8707f10250f780988b2 (patch)
tree7b9a502d849b761d966114b855a1fa9de4022e90 /elf/dl-lookup.c
parent9eb71e60ef889158238c3066c75b65336d846684 (diff)
downloadglibc-be93561004695198611aa8707f10250f780988b2.tar.gz
glibc-be93561004695198611aa8707f10250f780988b2.tar.xz
glibc-be93561004695198611aa8707f10250f780988b2.zip
Update.
1998-09-06 09:00  Ulrich Drepper  <drepper@cygnus.com>

	* version.h (VERSION): Bump to 2.0.96.

	Rewrite runtime linker to be truly thread-safe.  There is now no
	global variable specifying the scope.  We create all needed
	scopes at the time the link maps are created.
	* elf/Versions [GLIBC_2.1]: Add _dl_loaded and _dl_main_searchlist.
	* elf/link.h: Add struct r_scope_elem and use this for l_searchlist,
	l_symbolic_searchlist, l_scope, and l_local_scope elements in
	struct link_map.
	* elf/dl-close.c: Rewritten accordingly.
	* elf/dl-deps.c: Likewise.
	* elf/dl-error.c: Likewise.
	* elf/dl-init.c: Likewise.
	* elf/dl-load.c: Likewise.
	* elf/dl-lookup.c: Likewise.
	* elf/dl-object.c: Likewise.
	* elf/dl-open.c: Likewise.
	* elf/dl-reloc.c: Likewise.
	* elf/dl-runtime.c: Likewise.
	* elf/dl-support.c: Likewise.
	* elf/dl-symbol.c: Likewise.
	* elf/dl-version.c: Likewise.
	* elf/dlfcn.h: Likewise.
	* elf/dlsym.c: Likewise.
	* elf/dlvsym.c: Likewise.
	* elf/ldsodefs.h: Likewise.
	* elf/rtld.c: Likewise.
	* iconv/gconv_dl.c: Likewise.
	* nss/nsswitch.c: Likewise.
	* sysdeps/i386/dl-machine.h: Likewise.
	* sysdeps/unix/sysv/linux/i386/dl-librecon.h: Likewise.
Diffstat (limited to 'elf/dl-lookup.c')
-rw-r--r--elf/dl-lookup.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index 7badf86328..5245c628d2 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -63,12 +63,12 @@ struct sym_val
 static inline int
 do_lookup (const char *undef_name, unsigned long int hash,
 	   const ElfW(Sym) *ref, struct sym_val *result,
-	   struct link_map *scope, size_t i, const char *reference_name,
+	   struct r_scope_elem *scope, size_t i, const char *reference_name,
 	   const struct r_found_version *version, struct link_map *skip,
 	   int reloc_type)
 {
-  struct link_map **list = scope->l_searchlist;
-  size_t n = scope->l_nsearchlist;
+  struct link_map **list = scope->r_list;
+  size_t n = scope->r_nlist;
   struct link_map *map;
 
   for (; i < n; ++i)
@@ -212,13 +212,13 @@ do_lookup (const char *undef_name, unsigned long int hash,
 ElfW(Addr)
 internal_function
 _dl_lookup_symbol (const char *undef_name, const ElfW(Sym) **ref,
-		   struct link_map *symbol_scope[],
+		   struct r_scope_elem *symbol_scope[],
 		   const char *reference_name,
 		   int reloc_type)
 {
   const unsigned long int hash = _dl_elf_hash (undef_name);
   struct sym_val current_value = { NULL, NULL };
-  struct link_map **scope;
+  struct r_scope_elem **scope;
 
   /* Search the relevant loaded objects for a definition.  */
   for (scope = symbol_scope; *scope; ++scope)
@@ -260,19 +260,19 @@ _dl_lookup_symbol (const char *undef_name, const ElfW(Sym) **ref,
 ElfW(Addr)
 internal_function
 _dl_lookup_symbol_skip (const char *undef_name, const ElfW(Sym) **ref,
-			struct link_map *symbol_scope[],
+			struct r_scope_elem *symbol_scope[],
 			const char *reference_name,
 			struct link_map *skip_map)
 {
   const unsigned long int hash = _dl_elf_hash (undef_name);
   struct sym_val current_value = { NULL, NULL };
-  struct link_map **scope;
+  struct r_scope_elem **scope;
   size_t i;
 
   /* Search the relevant loaded objects for a definition.  */
   scope = symbol_scope;
-  for (i = 0; (*scope)->l_dupsearchlist[i] != skip_map; ++i)
-    assert (i < (*scope)->l_ndupsearchlist);
+  for (i = 0; (*scope)->r_duplist[i] != skip_map; ++i)
+    assert (i < (*scope)->r_nduplist);
 
   if (! do_lookup (undef_name, hash, *ref, &current_value,
 		   *scope, i, reference_name, NULL, skip_map, 0))
@@ -309,14 +309,14 @@ _dl_lookup_symbol_skip (const char *undef_name, const ElfW(Sym) **ref,
 ElfW(Addr)
 internal_function
 _dl_lookup_versioned_symbol (const char *undef_name, const ElfW(Sym) **ref,
-			     struct link_map *symbol_scope[],
+			     struct r_scope_elem *symbol_scope[],
 			     const char *reference_name,
 			     const struct r_found_version *version,
 			     int reloc_type)
 {
   const unsigned long int hash = _dl_elf_hash (undef_name);
   struct sym_val current_value = { NULL, NULL };
-  struct link_map **scope;
+  struct r_scope_elem **scope;
 
   /* Search the relevant loaded objects for a definition.  */
   for (scope = symbol_scope; *scope; ++scope)
@@ -375,20 +375,20 @@ ElfW(Addr)
 internal_function
 _dl_lookup_versioned_symbol_skip (const char *undef_name,
 				  const ElfW(Sym) **ref,
-				  struct link_map *symbol_scope[],
+				  struct r_scope_elem *symbol_scope[],
 				  const char *reference_name,
 				  const struct r_found_version *version,
 				  struct link_map *skip_map)
 {
   const unsigned long int hash = _dl_elf_hash (undef_name);
   struct sym_val current_value = { NULL, NULL };
-  struct link_map **scope;
+  struct r_scope_elem **scope;
   size_t i;
 
   /* Search the relevant loaded objects for a definition.  */
   scope = symbol_scope;
-  for (i = 0; (*scope)->l_dupsearchlist[i] != skip_map; ++i)
-    assert (i < (*scope)->l_ndupsearchlist);
+  for (i = 0; (*scope)->r_duplist[i] != skip_map; ++i)
+    assert (i < (*scope)->r_nduplist);
 
   if (! do_lookup (undef_name, hash, *ref, &current_value,
 		   *scope, i, reference_name, version, skip_map, 0))