This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[Patch]: Fix output of objdump -Wf
- From: Tristan Gingold <gingold at adacore dot com>
- To: "binutils at sourceware dot org Development" <binutils at sourceware dot org>
- Date: Mon, 24 Mar 2014 12:42:26 +0100
- Subject: [Patch]: Fix output of objdump -Wf
- Authentication-results: sourceware.org; auth=none
Hello,
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 ?
Tristan.
binutils/
* 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, §ion->start);