Using BFD to get debugging information from .elf files
Rick Mann
rmann@latencyzero.com
Wed Feb 28 22:32:00 GMT 2007
On Feb 28, 2007, at 14:03 , Alan Modra wrote:
> You're missing bfd_check_format (bfdRef, bfd_object)
Hmm. How bizarre. I had bfd_archive in the call to bfd_check_format
(), so I changed it to bfd_object, and now it works.
When I searched the archives before, I found someone with a similar
question, and a similar response. I looked up the call in the online
docs to try to understand it better.
So I added the call to bfd_check_format(), I *think* with bfd_object,
and it still failed. I then experimented with various calls to
bfd_check_format and bfd_check_format_matches(), all to no avail.
What I posted in my email was a hand-edited version of the last
attempt, with bfd_check_format_matches().
The docs don't seem to indicate that there is a side-effect to
calling bfd_check_format. Can you elaborate on what that side-effect
is? It works with the call, and not without it, even though I take no
action other than to print the result. I can call it twice, with both
bfd_archive and bfd_object, in either order, and it succeeds.
Thanks!
--
Rick
More information about the Binutils
mailing list