aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-reloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-reloc.c')
-rw-r--r--elf/dl-reloc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c
index f1c43ea..d2122a8 100644
--- a/elf/dl-reloc.c
+++ b/elf/dl-reloc.c
@@ -58,7 +58,10 @@ _dl_relocate_object (struct link_map *l, struct link_map *scope[], int lazy)
/* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code. */
#define RESOLVE(ref, version, flags) \
- ((version) != NULL && (version)->hash != 0 \
+ ((*ref)->st_shndx != SHN_UNDEF && \
+ ELFW(ST_BIND) ((*ref)->st_info) == STB_LOCAL \
+ ? l->l_addr : \
+ (version) != NULL && (version)->hash != 0 \
? _dl_lookup_versioned_symbol (strtab + (*ref)->st_name, (ref), scope, \
l->l_name, (version), (flags)) \
: _dl_lookup_symbol (strtab + (*ref)->st_name, (ref), scope, \