]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
libdwfl/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Sat, 27 Oct 2012 18:45:27 +0000 (20:45 +0200)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 20 Nov 2012 14:06:26 +0000 (15:06 +0100)
* dwfl_report_elf.c (__libdwfl_report_elf): Simplify START and BIAS
calculation.

Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
libdwfl/ChangeLog
libdwfl/dwfl_report_elf.c

index bdd9440f19bd4fccacd9cf120d7e1c29ae687e74..7673346251298703f038339cb6ae0604ec04ed90 100644 (file)
@@ -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
index 35d9f485949a192e65986b5bec98c2549d973660..174ce7ce3e0387d1a72a8a78c7d33a794746f6a7 100644 (file)
@@ -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;)
        {