diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-06-30 02:55:57 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-06-30 02:55:57 +0000 |
commit | 1ba3a7b727b49d61b4868a06f1258a54db4dc9e0 (patch) | |
tree | 3958d8fe8647427ecaacf38922a128d8d5c51c1a /ldso/include/dl-elf.h | |
parent | 1d6903684a1f73d72fb913c62491693f35f02d62 (diff) |
Bernd Schmidt writes: abstract away addresses so we can support FDPIC ELFs
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); |