[Patch]: Fix output of objdump -Wf

Tristan Gingold gingold@adacore.com
Mon Mar 24 11:42:00 GMT 2014


the purpose of this patch is to correctly display the values of FDE pc in objdump -Wf: it sets
the address field of struct dwarf_section, so that dwarf.c:get_encoded_value can relocate pcrel
encoded values.

With this patch, the output of objdump -Wf matches the output of readelf -wf.

No regressions for i386-linux

Ok for trunk ?


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

diff --git a/binutils/objdump.c b/binutils/objdump.c
index 20e3b09..14f4122 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -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);

More information about the Binutils mailing list