This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: BFD questions
Date: Sat, 11 Sep 1999 14:10:53 -0500 (EST)
From: Lynn Winebarger <owinebar@free-expression.org>
Anyway, I've been reading BFD's manual, and I would like to get some
more information on the canonical format. In particular, I want to find
out how to resolve symbol references in the disassembled code. This would
be very useful in decompiling shared libraries or executables that export
symbols to shared libraries/refer to symbols in shared libraries. The
objdump's disassembler appears to only resolve symbol references that are
in the text section (i.e. function names) even when there are a lot of
data symbols available.
objdump ought to be able to use other symbols. Are you disassembling
fully linked executables? Look at find_symbol_for_address in
binutils/objdump.c. Note that objdump only has a chance of finding
symbols if sections are at different addresses; that will be true for
a fully linked executable, and as far as I can recall it should be
true for a fully linked shared library.
By the way, objdump doesn't seem to recognize .dll symbol tables when
given the -t or -T flags.
This may be the problem. If BFD can't find the symbol table, objdump
isn't going to be able to use it to resolve references.
Alternatively, if anyone has a recommendation for docs I can read to
see how to resolve symbols (i.e. how the code is eventually loaded), I
would be appreciative.
I doubt there is any documentation you don't already have.
Ian