/* 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.
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
/* 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
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, (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)
/* 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
}
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)
}
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)
/* 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
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)
struct link_map *map = handle;
result = _dl_lookup_symbol (name, match, &ref, map->l_local_scope,
- 0, 1);
+ 0, DL_LOOKUP_RETURN_NEWEST);
}
else
{
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))
/* 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)
/* 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>.
} \
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 \