diff options
Diffstat (limited to 'ldso/include/dl-elf.h')
-rw-r--r-- | ldso/include/dl-elf.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ldso/include/dl-elf.h b/ldso/include/dl-elf.h index de404aec1..9e364d680 100644 --- a/ldso/include/dl-elf.h +++ b/ldso/include/dl-elf.h @@ -94,10 +94,12 @@ extern void _dl_protect_relro (struct elf_resolve *l); #define DYNAMIC_SIZE (DT_NUM+OS_NUM+ARCH_NUM) -extern void _dl_parse_dynamic_info(ElfW(Dyn) *dpnt, unsigned long dynamic_info[], void *debug_addr, ElfW(Addr) load_off); +extern void _dl_parse_dynamic_info(ElfW(Dyn) *dpnt, unsigned long dynamic_info[], void *debug_addr, + DL_LOADADDR_TYPE load_off); static __always_inline -void __dl_parse_dynamic_info(ElfW(Dyn) *dpnt, unsigned long dynamic_info[], void *debug_addr, ElfW(Addr) load_off) +void __dl_parse_dynamic_info(ElfW(Dyn) *dpnt, unsigned long dynamic_info[], void *debug_addr, + DL_LOADADDR_TYPE load_off) { for (; dpnt->d_tag; dpnt++) { if (dpnt->d_tag < DT_NUM) { @@ -139,7 +141,8 @@ void __dl_parse_dynamic_info(ElfW(Dyn) *dpnt, unsigned long dynamic_info[], void #define ADJUST_DYN_INFO(tag, load_off) \ do { \ if (dynamic_info[tag]) \ - dynamic_info[tag] += load_off; \ + dynamic_info[tag] = (unsigned long)DL_RELOC_ADDR (dynamic_info[tag], \ + load_off); \ } while(0) ADJUST_DYN_INFO(DT_HASH, load_off); ADJUST_DYN_INFO(DT_PLTGOT, load_off); |