This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch]: Fix output of objdump -Wf


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, &section->start);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]