public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [Patch]: Fix output of objdump -Wf
@ 2014-03-24 11:42 Tristan Gingold
  2014-03-27  2:41 ` Alan Modra
  0 siblings, 1 reply; 3+ messages in thread
From: Tristan Gingold @ 2014-03-24 11:42 UTC (permalink / raw)
  To: binutils@sourceware.org Development

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);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Patch]: Fix output of objdump -Wf
  2014-03-24 11:42 [Patch]: Fix output of objdump -Wf Tristan Gingold
@ 2014-03-27  2:41 ` Alan Modra
  2014-03-27  8:39   ` Tristan Gingold
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Modra @ 2014-03-27  2:41 UTC (permalink / raw)
  To: Tristan Gingold; +Cc: binutils@sourceware.org Development

On Mon, Mar 24, 2014 at 12:42:26PM +0100, Tristan Gingold wrote:
> 	* objdump.c (load_specific_debug_section): Set address of section.

OK.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Patch]: Fix output of objdump -Wf
  2014-03-27  2:41 ` Alan Modra
@ 2014-03-27  8:39   ` Tristan Gingold
  0 siblings, 0 replies; 3+ messages in thread
From: Tristan Gingold @ 2014-03-27  8:39 UTC (permalink / raw)
  To: Alan Modra; +Cc: binutils@sourceware.org Development


On 27 Mar 2014, at 03:41, Alan Modra <amodra@gmail.com> wrote:

> On Mon, Mar 24, 2014 at 12:42:26PM +0100, Tristan Gingold wrote:
>> 	* objdump.c (load_specific_debug_section): Set address of section.
> 
> OK.

Thanks, committed.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-03-27  8:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-24 11:42 [Patch]: Fix output of objdump -Wf Tristan Gingold
2014-03-27  2:41 ` Alan Modra
2014-03-27  8:39   ` Tristan Gingold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).