This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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]

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


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