]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Adjust all callers of _dl_lookup_symbol and _dl_lookup_versioned_symbol.
authorUlrich Drepper <drepper@redhat.com>
Sat, 13 Apr 2002 16:04:45 +0000 (16:04 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 13 Apr 2002 16:04:45 +0000 (16:04 +0000)
elf/dl-libc.c
elf/dl-reloc.c
elf/dl-runtime.c
elf/dl-sym.c
sysdeps/mips/dl-machine.h

index c83448df77c0adbcd26becba3e42ab0582c42b33..fd3ee727ba38b3129c5433a840b919407129d86e 100644 (file)
@@ -1,5 +1,5 @@
 /* Handle loading and unloading shared objects for internal libc purposes.
-   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Zack Weinberg <zack@rabi.columbia.edu>, 1999.
 
@@ -84,7 +84,8 @@ do_dlsym (void *ptr)
   struct do_dlsym_args *args = (struct do_dlsym_args *) ptr;
   args->ref = NULL;
   args->loadbase = _dl_lookup_symbol (args->name, args->map, &args->ref,
-                                     args->map->l_local_scope, 0, 1);
+                                     args->map->l_local_scope, 0,
+                                     DL_LOOKUP_RETURN_NEWEST);
 }
 
 static void
index 2328330f45700fab8fdf0b1518755d824bfef995..f9c31356bebbd1a2dfb4ca481d062dc02ffc3231 100644 (file)
@@ -1,5 +1,5 @@
 /* Relocate a shared object and resolve its references to other loaded objects.
-   Copyright (C) 1995,96,97,98,99,2000,2001 Free Software Foundation, Inc.
+   Copyright (C) 1995,96,97,98,99,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
@@ -126,7 +126,8 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
                                                   l, (ref), scope,           \
                                                   (version), _tc, 0)         \
                    : _dl_lookup_symbol (strtab + (*ref)->st_name, l, (ref),  \
-                                        scope, _tc, 0));                     \
+                                        scope, _tc,                          \
+                                        DL_LOOKUP_ADD_DEPENDENCY));          \
             l->l_lookup_cache.ret = (*ref);                                  \
             l->l_lookup_cache.value = _lr; }))                               \
      : l)
@@ -146,7 +147,8 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
                                                   l, (ref), scope,           \
                                                   (version), _tc, 0)         \
                    : _dl_lookup_symbol (strtab + (*ref)->st_name, l, (ref),  \
-                                        scope, _tc, 0));                     \
+                                        scope, _tc,                          \
+                                        DL_LOOKUP_ADD_DEPENDENCY));          \
             l->l_lookup_cache.ret = (*ref);                                  \
             l->l_lookup_cache.value = _lr; }))                               \
      : l->l_addr)
index 2f5832426b8cb2b5bb95b3d61b5e79168ee7b9cb..b8aa725aa2420c2ade0d8851539bee792d47e06e 100644 (file)
@@ -1,5 +1,5 @@
 /* On-demand PLT fixup for shared objects.
-   Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1995-1999, 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
@@ -95,7 +95,8 @@ fixup (
          }
        case 0:
          result = _dl_lookup_symbol (strtab + sym->st_name, l, &sym,
-                                     l->l_scope, ELF_RTYPE_CLASS_PLT, 0);
+                                     l->l_scope, ELF_RTYPE_CLASS_PLT,
+                                     DL_LOOKUP_ADD_DEPENDENCY);
        }
 
       /* Currently result contains the base load address (or link map)
@@ -188,7 +189,8 @@ profile_fixup (
              }
            case 0:
              result = _dl_lookup_symbol (strtab + sym->st_name, l, &sym,
-                                         l->l_scope, ELF_RTYPE_CLASS_PLT, 0);
+                                         l->l_scope, ELF_RTYPE_CLASS_PLT,
+                                         DL_LOOKUP_ADD_DEPENDENCY);
            }
 
          /* Currently result contains the base load address (or link map)
index 85d084f7f70cec35f9470cc76683cf91c209be76..16d73ef1520d7cc5e0ad5a00a6bc0c53bfe700ef 100644 (file)
@@ -1,5 +1,5 @@
 /* Look up a symbol in a shared object loaded by `dlopen'.
-   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1999, 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
@@ -51,7 +51,9 @@ _dl_sym (void *handle, const char *name, void *who)
 
   if (handle == RTLD_DEFAULT)
     /* Search the global scope as seen in the caller object.  */
-    result = _dl_lookup_symbol (name, match, &ref, match->l_scope, 0, 0);
+    result = _dl_lookup_symbol (name, match, &ref, match->l_scope, 0,
+                               DL_LOOKUP_RETURN_NEWEST
+                               | DL_LOOKUP_ADD_DEPENDENCY);
   else
     {
       if (handle != RTLD_NEXT)
@@ -60,7 +62,7 @@ _dl_sym (void *handle, const char *name, void *who)
          struct link_map *map = handle;
 
          result = _dl_lookup_symbol (name, match, &ref, map->l_local_scope,
-                                     0, 1);
+                                     0, DL_LOOKUP_RETURN_NEWEST);
        }
       else
        {
@@ -123,7 +125,7 @@ _dl_vsym (void *handle, const char *name, const char *version, void *who)
   if (handle == RTLD_DEFAULT)
     /* Search the global scope.  */
     result = _dl_lookup_versioned_symbol (name, match, &ref, match->l_scope,
-                                         &vers, 0, 0);
+                                         &vers, 0, DL_LOOKUP_ADD_DEPENDENCY);
   else if (handle == RTLD_NEXT)
     {
       if (__builtin_expect (match == _dl_loaded, 0))
@@ -148,7 +150,7 @@ RTLD_NEXT used in code not dynamically loaded"));
       /* Search the scope of the given object.  */
       struct link_map *map = handle;
       result = _dl_lookup_versioned_symbol (name, map, &ref,
-                                           map->l_local_scope, &vers, 0, 1);
+                                           map->l_local_scope, &vers, 0, 0);
     }
 
   if (ref != NULL)
index da9a5d3279ce9a63ccb70c165d754ca02548edcf..c9c8eb4aea05feffa877f1e22a0e14af8e35bae9 100644 (file)
@@ -1,5 +1,5 @@
 /* Machine-dependent ELF dynamic relocation inline functions.  MIPS version.
-   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.
    Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
 
@@ -308,7 +308,8 @@ __dl_runtime_resolve (ElfW(Word) sym_index,                               \
          }                                                                   \
        case 0:                                                               \
          value = _dl_lookup_symbol (strtab + sym->st_name, l, &sym,          \
-                                    l->l_scope, ELF_RTYPE_CLASS_PLT, 0);     \
+                                    l->l_scope, ELF_RTYPE_CLASS_PLT,         \
+                                    DL_LOOKUP_ADD_DEPENDENCY);               \
        }                                                                     \
                                                                              \
       /* Currently value contains the base load address of the object        \