aboutsummaryrefslogtreecommitdiff
path: root/elf/do-lookup.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-05-22 16:31:58 +0000
committerUlrich Drepper <drepper@redhat.com>2000-05-22 16:31:58 +0000
commit07d3c1bfc2045b76df413f4c12fb7adb0623d68b (patch)
treef5c4b62a7703f991f4496dd7cc8644f70a3e01f5 /elf/do-lookup.h
parent85153f6c4c85653fec836e017d865f80d2885ae9 (diff)
downloadglibc-07d3c1bfc2045b76df413f4c12fb7adb0623d68b.zip
glibc-07d3c1bfc2045b76df413f4c12fb7adb0623d68b.tar.gz
glibc-07d3c1bfc2045b76df413f4c12fb7adb0623d68b.tar.bz2
(do_lookup_versioned): Replace reloc_type parameter with noexec and noplt parameter. (do_lookup): Likewise.
Diffstat (limited to 'elf/do-lookup.h')
-rw-r--r--elf/do-lookup.h19
1 files changed, 6 insertions, 13 deletions
diff --git a/elf/do-lookup.h b/elf/do-lookup.h
index 85f2341..873e953 100644
--- a/elf/do-lookup.h
+++ b/elf/do-lookup.h
@@ -1,5 +1,5 @@
/* Look up a symbol in the loaded objects.
- Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995, 96, 97, 98, 99, 2000 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
@@ -32,7 +32,7 @@ static inline int
FCT (const char *undef_name, struct link_map *undef_map,
unsigned long int hash, const ElfW(Sym) *ref, struct sym_val *result,
struct r_scope_elem *scope, size_t i, ARG struct link_map *skip,
- int reloc_type)
+ int noexec, int noplt)
{
struct link_map **list = scope->r_list;
size_t n = scope->r_nlist;
@@ -57,12 +57,11 @@ FCT (const char *undef_name, struct link_map *undef_map,
continue;
/* Don't search the executable when resolving a copy reloc. */
- if (elf_machine_lookup_noexec_p (reloc_type)
- && map->l_type == lt_executable)
+ if (noexec && map->l_type == lt_executable)
continue;
/* Print some debugging info if wanted. */
- if (_dl_debug_symbols)
+ if (__builtin_expect (_dl_debug_symbols, 0))
_dl_debug_message (1, "symbol=", undef_name, "; lookup in file=",
map->l_name[0] ? map->l_name : _dl_argv[0],
"\n", NULL);
@@ -80,8 +79,7 @@ FCT (const char *undef_name, struct link_map *undef_map,
sym = &symtab[symidx];
if (sym->st_value == 0 || /* No value. */
- (elf_machine_lookup_noplt_p (reloc_type) /* Reject PLT entry. */
- && sym->st_shndx == SHN_UNDEF))
+ (noplt && sym->st_shndx == SHN_UNDEF))
continue;
if (ELFW(ST_TYPE) (sym->st_info) > STT_FUNC)
@@ -154,12 +152,7 @@ FCT (const char *undef_name, struct link_map *undef_map,
sym = num_versions == 1 ? versioned_sym : NULL;
#endif
- if (sym != NULL
- /* Don't allow binding if the symbol is hidden. When processor
- specific definitions for STV_INTERNAL are defined we might
- have to extend this conditional. */
- && (ELFW(ST_VISIBILITY) (sym->st_other) != STV_HIDDEN
- || map == undef_map))
+ if (sym != NULL)
{
found_it:
switch (ELFW(ST_BIND) (sym->st_info))