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: How to determine which symbols in a library are used by the client?


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



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