summaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-reloc.c5
-rw-r--r--elf/rtld.c1
2 files changed, 5 insertions, 1 deletions
diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c
index f1c43ea174..d2122a8bdf 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, \
diff --git a/elf/rtld.c b/elf/rtld.c
index 15df75fe8b..84ab37942b 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -106,6 +106,7 @@ _dl_start (void *arg)
ELF_DYNAMIC_RELOCATE (&bootstrap_map, 0);
+ elf_machine_runtime_setup (&bootstrap_map, 0);
/* Now life is sane; we can call functions and access global data.
Set up to use the operating system facilities, and find out from