How to determine which symbols in a library are used by the client?
Nick Clifton
nickc@redhat.com
Mon Sep 17 16:47:00 GMT 2007
Hi Rick,
> I have a 3rd party graphics library and some code that uses it. I think
> we want to replace the graphics library, but we need to see what
> routines are called in it. Is there an easy way to do this?
Sure - just link your compiled code but without including the 3rd party
graphics library. You should get "unresolved reference" errors from the linker
for the functions in the graphics library that are called from your code.
Alternatively link your application as normal, including the graphics library,
but also including the "-Map foo.map" command line option. Then look through
the foo.map file for the names of the symbols from the graphics library that
have been included in the executable.
Cheers
Nick
More information about the Binutils
mailing list