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/link_map.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/link_map.c')
-rw-r--r-- | libdwfl/link_map.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libdwfl/link_map.c b/libdwfl/link_map.c index 8ec06269..05839b3a 100644 --- a/libdwfl/link_map.c +++ b/libdwfl/link_map.c @@ -515,11 +515,11 @@ consider_executable (Dwfl_Module *mod, GElf_Addr at_phdr, GElf_Addr at_entry, /* If we're changing the module's address range, we've just invalidated the module lookup table. */ - if (bias != mod->main.bias) + GElf_Addr mod_bias = dwfl_adjusted_address (mod, 0); + if (bias != mod_bias) { - mod->low_addr -= mod->main.bias; - mod->high_addr -= mod->main.bias; - mod->main.bias = bias; + mod->low_addr -= mod_bias; + mod->high_addr -= mod_bias; mod->low_addr += bias; mod->high_addr += bias; @@ -554,7 +554,7 @@ consider_executable (Dwfl_Module *mod, GElf_Addr at_phdr, GElf_Addr at_entry, if (d_val_vaddr != 0) { /* Now we have the final address from which to read &r_debug. */ - d_val_vaddr += mod->main.bias; + d_val_vaddr = dwfl_adjusted_address (mod, d_val_vaddr); void *buffer = NULL; size_t buffer_available = addrsize (ehdr.e_ident[EI_CLASS]); |