summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-10-27 20:45:27 +0200
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-11-20 15:06:26 +0100
commitae81c70c997a87ffd2643dfc7818cff89bbba8f6 (patch)
tree85205d3c726bedead239c5f6925b0b0a02dc2798
parent7e3bd4f5ee255c494853abe9e015d01b0c3baf63 (diff)
downloadelfutils-ae81c70c997a87ffd2643dfc7818cff89bbba8f6.tar.gz
libdwfl/
* dwfl_report_elf.c (__libdwfl_report_elf): Simplify START and BIAS calculation. Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
-rw-r--r--libdwfl/ChangeLog5
-rw-r--r--libdwfl/dwfl_report_elf.c4
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 <jan.kratochvil@redhat.com>
+
+ * dwfl_report_elf.c (__libdwfl_report_elf): Simplify START and BIAS
+ calculation.
+
2012-10-17 Jan Kratochvil <jan.kratochvil@redhat.com>
* 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;)
{