This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Use output from ld to determine which archives/libraries/object files were used
- From: "Hitchcock, Ryan B. (rh5)" <hitchcockrb at ornl dot gov>
- To: binutils at sourceware dot org
- Date: Thu, 14 Aug 2008 15:19:42 -0400
- Subject: Use output from ld to determine which archives/libraries/object files were used
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