This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Post-link decomposition of binary
- From: Amos Waterland <apw at us dot ibm dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 20 Jan 2003 18:21:08 -0600
- Subject: Post-link decomposition of binary
Given an ELF object, is it possible to acquire a list of every header
file that went into its compilation, as well as every static library
linked into it?
After examining the output of readelf, objdump, and nm, I do not think
that such information is embedded by gcc or binutils in ELF objects.
I looked at the output of -fdump-translation-unit-all as well as the
files produced by -save-temps, but cannot seem to find the information I
am looking for.
Is the best way to handle this to wrap gcc with a script which performs
pre-compilation analysis on the translation units?
Amos Waterland