objdump: set address of debug sections.
authorTristan Gingold <tristan.gingold@adacore.com>
Mon, 24 Mar 2014 11:37:32 +0000 (12:37 +0100)
committerTristan Gingold <tristan.gingold@adacore.com>
Thu, 27 Mar 2014 08:35:10 +0000 (09:35 +0100)
This patche fixes the values of FDE pc in output of objdump -Wf. They now
match readelf ones.

binutils/
* objdump.c (load_specific_debug_section): Set address of section.

binutils/ChangeLog
binutils/objdump.c

index 0d9648c..b9fa77d 100644 (file)
@@ -4,6 +4,10 @@
 
 2014-03-24  Tristan Gingold  <gingold@adacore.com>
 
+       * objdump.c (load_specific_debug_section): Set address of section.
+
+2014-03-24  Tristan Gingold  <gingold@adacore.com>
+
        * od-macho.c (dump_unwind_encoding_x86): Set the factor.
        (dump_exe_compact_unwind): Change the condition.  Improve
        indentation.
index 20e3b09..14f4122 100644 (file)
@@ -2259,7 +2259,7 @@ load_specific_debug_section (enum dwarf_section_display_enum debug,
   if (section->start != NULL)
     return 1;
 
-  section->address = 0;
+  section->address = bfd_get_section_vma (abfd, sec);
   section->size = bfd_get_section_size (sec);
   section->start = NULL;
   ret = bfd_get_full_section_contents (abfd, sec, &section->start);