]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - ld/lexsup.c
Report scripts and libraries searched for ld --trace
authorAlan Modra <amodra@gmail.com>
Mon, 29 Oct 2018 07:40:06 +0000 (18:10 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 29 Oct 2018 07:51:05 +0000 (18:21 +1030)
commit727a29badd95a68d08b86fec0b98702ce756c660
tree83df8737f89d9e8cee74c6d1e98db4475a7555fb
parent5c87f94bb85e5b8e715aa7f947ecc602960f20ee
Report scripts and libraries searched for ld --trace

The idea of this change is to make -t output useful for users wanting
to package all the object files involved in linking for a bug report.

Something like the following should do the trick.
gcc hello.c -save-temps -Wl,-t | xargs realpath | sort | uniq > files
tar cJf test.tar.xz `cat files`

* ldlang.c (load_symbols): When -t, print file names for script
files and archives.
* ldmain.c (trace_files): Make an int.
(add_archive_element): Print archive elements only with multiple
-t options, or when archive is thin.
* ldmain.h (trace_files): Update.
* ldmisc.c (vfinfo): Don't print both original path and path in
sysroot.
* lexsup.c (parse_args <t>): Increment trace_files.
ld/ChangeLog
ld/ldlang.c
ld/ldmain.c
ld/ldmain.h
ld/ldmisc.c
ld/lexsup.c