summaryrefslogtreecommitdiff
path: root/elf/do-lookup.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-08-26 22:28:16 +0000
committerUlrich Drepper <drepper@redhat.com>2001-08-26 22:28:16 +0000
commitcf5a372ec12437bf79cb130c124ace1f62d97144 (patch)
tree972a8fc7bb3612407a0e5581028b9bf28c22cfde /elf/do-lookup.h
parent107d41a9b2da96db479e9b52b0a81a9174229ff7 (diff)
Update.
2001-08-26 Jakub Jelinek <jakub@redhat.com> * elf/dl-reloc.c (RESOLVE_MAP, RESOLVE): Use elf_machine_type_class instead of elf_machine_lookup_noexec_p and elf_machine_lookup_noplt_p. Pass type_class to _dl_lookup_*. * elf/dl-lookup.c (_dl_lookup_symbol): Take type_clas parameter now. Pass around just type_class instead of noexec, noplt pair. (_dl_lookup_versioned_symbol): Likewise. (_dl_lookup_symbol_skip): Pass around just type_class instead of noexec, noplt pair. (_dl_lookup_versioned_symbol_skip): Likewise. (_dl_do_lookup, _dl_do_lookup_versioned): Likewise. * elf/do-lookup.h (do_lookup): Likewise. * include/link.h (struct link_map): Replace noexec and noplt fields in l_lookup_cache with type_class field. * sysdeps/generic/ldsodefs.h (ELF_RTYPE_CLASS_PLT, ELF_RTYPE_CLASS_COPY): Define. Adjust prototypes for _dl_lookup_symbol and _dl_lookup_versioned_symbol. * sysdeps/alpha/dl-machine.h (elf_machine_lookup_noplt_p, elf_machine_lookup_noexec_p): Remove. (elf_machine_type_class): Define. * sysdeps/arm/dl-machine.h: Likewise. * sysdeps/hppa/dl-machine.h: Likewise. * sysdeps/cris/dl-machine.h: Likewise. * sysdeps/i386/dl-machine.h: Likewise. * sysdeps/ia64/dl-machine.h: Likewise. * sysdeps/m68k/dl-machine.h: Likewise. * sysdeps/mips/mips64/dl-machine.h: Likewise. * sysdeps/mips/dl-machine.h: Likewise. * sysdeps/powerpc/dl-machine.h: Likewise. * sysdeps/sparc/sparc32/dl-machine.h: Likewise. * sysdeps/sparc/sparc64/dl-machine.h: Likewise. * sysdeps/sh/dl-machine.h: Likewise. * sysdeps/s390/s390-32/dl-machine.h: Likewise. * sysdeps/s390/s390-64/dl-machine.h: Likewise.
Diffstat (limited to 'elf/do-lookup.h')
-rw-r--r--elf/do-lookup.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/elf/do-lookup.h b/elf/do-lookup.h
index e60e227fcd..b9364b95d1 100644
--- a/elf/do-lookup.h
+++ b/elf/do-lookup.h
@@ -31,7 +31,7 @@
static inline int
FCT (const char *undef_name, 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 noexec, int noplt)
+ struct link_map *skip, int type_class)
{
struct link_map **list = scope->r_list;
size_t n = scope->r_nlist;
@@ -56,7 +56,7 @@ FCT (const char *undef_name, unsigned long int hash, const ElfW(Sym) *ref,
continue;
/* Don't search the executable when resolving a copy reloc. */
- if (noexec && map->l_type == lt_executable)
+ if ((type_class & ELF_RTYPE_CLASS_COPY) && map->l_type == lt_executable)
continue;
/* Print some debugging info if wanted. */
@@ -76,8 +76,11 @@ FCT (const char *undef_name, unsigned long int hash, const ElfW(Sym) *ref,
{
sym = &symtab[symidx];
+ assert (ELF_RTYPE_CLASS_PLT == 1);
if (sym->st_value == 0 || /* No value. */
- (noplt && sym->st_shndx == SHN_UNDEF))
+ /* ((type_class & ELF_RTYPE_CLASS_PLT)
+ && (sym->st_shndx == SHN_UNDEF)) */
+ (type_class & (sym->st_shndx == SHN_UNDEF)))
continue;
if (ELFW(ST_TYPE) (sym->st_info) > STT_FUNC)