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]

Re: using link map to go from address to symbol


Hi Michael,

I'm looking to go from addresses to symbols.  In the past, I've used
addr2line to go from program addresses back to their corresponding
location in source.  But I'm in a circumstance now where I have a
stripped executable with a (pretty large - ~30MB) link map.  I'd like to
be able to use the link map to at least get to function or routine
names,

Why ? What is wrong with continuing to use the addr2line tool ? After all this is exactly what it is designed for.


assuming they haven't been optimized away.  So far, I've been
manually searching through the link map to try to figure out what the
address corresponds to in my source.  But I'm wondering if there isn't
an easier or more automated way of going backwards with that link map.
Is there some tool similar to addr2line that will work on maps instead
of executables?

There is no such tool. Well at least not one known to this project. But this sounds like the kind of task that would be particularly well suited to one of the scripting languages. You might try writing a Perl script to parse the map file and create an associative array of addresses and symbol names.


Cheers
  Nick



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