diff options
author | Florian Weimer <fweimer@redhat.com> | 2020-04-24 22:13:03 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2020-04-24 22:13:03 +0200 |
commit | 50a2d83c08a94a10f88a1fedeb7a6e3667a6b732 (patch) | |
tree | 4fdc0dd13db811d4b08db15aee6ad8381fc16d67 /elf | |
parent | 781dacc4f41332098e3a272514b20a490a7ebc8c (diff) | |
download | glibc-50a2d83c08a94a10f88a1fedeb7a6e3667a6b732.tar.gz glibc-50a2d83c08a94a10f88a1fedeb7a6e3667a6b732.tar.xz glibc-50a2d83c08a94a10f88a1fedeb7a6e3667a6b732.zip |
elf: Introduce <elf_machine_sym_no_match.h>
MIPS needs to ignore certain existing symbols during symbol lookup. The old scheme uses the ELF_MACHINE_SYM_NO_MATCH macro, with an inline function, within its own header, with a sysdeps override for MIPS. This allows re-use of the function from another file (without having to include <dl-machine.h> or providing the default definition for ELF_MACHINE_SYM_NO_MATCH). Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'elf')
-rw-r--r-- | elf/dl-lookup.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c index 12a229f06c..807f3ea9b6 100644 --- a/elf/dl-lookup.c +++ b/elf/dl-lookup.c @@ -28,18 +28,12 @@ #include <libc-lock.h> #include <tls.h> #include <atomic.h> +#include <elf_machine_sym_no_match.h> #include <assert.h> -/* Return nonzero if check_match should consider SYM to fail to match a - symbol reference for some machine-specific reason. */ -#ifndef ELF_MACHINE_SYM_NO_MATCH -# define ELF_MACHINE_SYM_NO_MATCH(sym) 0 -#endif - #define VERSTAG(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (tag)) - struct sym_val { const ElfW(Sym) *s; @@ -78,7 +72,7 @@ check_match (const char *const undef_name, if (__glibc_unlikely ((sym->st_value == 0 /* No value. */ && sym->st_shndx != SHN_ABS && stt != STT_TLS) - || ELF_MACHINE_SYM_NO_MATCH (sym) + || elf_machine_sym_no_match (sym) || (type_class & (sym->st_shndx == SHN_UNDEF)))) return NULL; |