From ae81c70c997a87ffd2643dfc7818cff89bbba8f6 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Sat, 27 Oct 2012 20:45:27 +0200 Subject: libdwfl/ * dwfl_report_elf.c (__libdwfl_report_elf): Simplify START and BIAS calculation. Signed-off-by: Jan Kratochvil --- libdwfl/ChangeLog | 5 +++++ libdwfl/dwfl_report_elf.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index bdd9440f..76733462 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,3 +1,8 @@ +2012-11-20 Jan Kratochvil + + * dwfl_report_elf.c (__libdwfl_report_elf): Simplify START and BIAS + calculation. + 2012-10-17 Jan Kratochvil * dwfl_module_getdwarf.c (mod_verify_build_id): New function with code diff --git a/libdwfl/dwfl_report_elf.c b/libdwfl/dwfl_report_elf.c index 35d9f485..174ce7ce 100644 --- a/libdwfl/dwfl_report_elf.c +++ b/libdwfl/dwfl_report_elf.c @@ -183,11 +183,11 @@ __libdwfl_report_elf (Dwfl *dwfl, const char *name, const char *file_name, address_sync = ph->p_vaddr + ph->p_memsz; if ((base & (ph->p_align - 1)) != 0) base = (base + ph->p_align - 1) & -ph->p_align; - start = base + (ph->p_vaddr & -ph->p_align); + start = base + vaddr; break; } } - bias = start - vaddr; + bias = base; for (size_t i = phnum; i-- > 0;) { -- cgit v1.2.1