diff options
author | Roland McGrath <roland@redhat.com> | 2010-11-12 16:46:47 -0800 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 2010-11-12 16:46:47 -0800 |
commit | 1743d7f010bead5e869d097e23ce840583913381 (patch) | |
tree | 31a98ee593aca90ff62b849bb3c3a580b1465d48 /libdwfl/dwfl_module_build_id.c | |
parent | 58af2001b92a8a8ee21a81b2845449ae8d038b7c (diff) | |
download | elfutils-1743d7f010bead5e869d097e23ce840583913381.tar.gz |
libdwfl: Revamp bias bookkeeping, account correctly for prelink REL->RELA segment inflation.
Diffstat (limited to 'libdwfl/dwfl_module_build_id.c')
-rw-r--r-- | libdwfl/dwfl_module_build_id.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libdwfl/dwfl_module_build_id.c b/libdwfl/dwfl_module_build_id.c index 9dc7f678..f9888660 100644 --- a/libdwfl/dwfl_module_build_id.c +++ b/libdwfl/dwfl_module_build_id.c @@ -124,7 +124,7 @@ __libdwfl_find_build_id (Dwfl_Module *mod, bool set, Elf *elf) phdr->p_offset, phdr->p_filesz, ELF_T_NHDR), - phdr->p_vaddr + mod->main.bias); + dwfl_adjusted_address (mod, phdr->p_vaddr)); } } else @@ -139,7 +139,7 @@ __libdwfl_find_build_id (Dwfl_Module *mod, bool set, Elf *elf) if (!(shdr->sh_flags & SHF_ALLOC)) vaddr = NO_VADDR; else if (mod->e_type != ET_REL) - vaddr = shdr->sh_addr + mod->main.bias; + vaddr = dwfl_adjusted_address (mod, shdr->sh_addr); else if (__libdwfl_relocate_value (mod, elf, &shstrndx, elf_ndxscn (scn), &vaddr)) vaddr = NO_VADDR; |