Use output from ld to determine which archives/libraries/object files were used

Hitchcock, Ryan B. (rh5) hitchcockrb@ornl.gov
Thu Aug 14 19:20:00 GMT 2008


Hi,

I hope I am asking this question in the appropriate location. I am working
on a software tracking project at work, and I am a little stumped with
something. I currently have an implementation which intercepts (wraps) ld
and extracts the link line that was passed to ld, but many of the libraries
listed on the link line are added by the compiler wrappers (implemented by
Cray) and these libraries are not actually USED by the user¹s final program,
so ld is not actually linking them in. Is there any way to extract which
libraries ld is actually linking against, whether it¹s via a mapfile or some
other method? I¹ve tried messing around with the ld mapfile, but I¹m not
always sure what I¹m looking at. It seems to be listing all of the functions
of all of the libraries, even ones that were not used. Any answers or
suggestions will be greatly appreciated.

Thank you,
Blake Hitchcock



More information about the Binutils mailing list