From: Tristan Gingold <gingold@adacore.com>
To: "binutils@sourceware.org Development" <binutils@sourceware.org>
Subject: [Patch]: Fix output of objdump -Wf
Date: Mon, 24 Mar 2014 11:42:00 -0000 [thread overview]
Message-ID: <E3BF42D6-B7A1-4756-B0D8-A44048B43867@adacore.com> (raw)
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);
next reply other threads:[~2014-03-24 11:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-24 11:42 Tristan Gingold [this message]
2014-03-27 2:41 ` Alan Modra
2014-03-27 8:39 ` Tristan Gingold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E3BF42D6-B7A1-4756-B0D8-A44048B43867@adacore.com \
--to=gingold@adacore.com \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).