This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Report scripts and libraries searched for ld --trace
- From: Alan Modra <amodra at gmail dot com>
- To: "Ilya Yu. Malakhov" <malakhov at mcst dot ru>
- Cc: binutils at sourceware dot org
- Date: Thu, 31 Jan 2019 11:43:16 +1030
- Subject: Re: Report scripts and libraries searched for ld --trace
- References: <wfck1imifis.fsf@gudgeon.lab.sun.mcst.ru>
On Wed, Jan 30, 2019 at 01:52:27PM +0300, Ilya Yu. Malakhov wrote:
> . . .
> > 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.
> . . .
>
> The idea is good, but because this change hasn't been documented
> anywhere, people relying on `ld -t' to track archive members involved
> into link have been confused as they have no idea how to achieve the old
> behaviour.
>
> It would be nice to describe this option in ld.info in more detail and
> pay the user's attention to the fact that it should be passed more than
> once if archive elements need to be traced.
True. (A patch to fix it would have been welcome.)
* NEWS: Mention -t change.
* ld.texi (--trace/-t): Expand documentation a little.
diff --git a/ld/NEWS b/ld/NEWS
index f13cdd7a79..d737af7051 100644
--- a/ld/NEWS
+++ b/ld/NEWS
@@ -6,6 +6,12 @@ Changes in 2.32:
* Add support for the C-SKY processor series.
+* -t now doesn't report members within archives, unless -t is given twice.
+ A single -t is now more useful when generating a list of files that should be
+ packaged for a linker bug report. For example:
+ gcc hello.c -save-temps -Wl,-t | xargs realpath | sort | uniq > files
+ tar cJf test.tar.xz `cat files`
+
Changes in 2.31:
* Speed up direct linking with DLLs for Cygwin and Mingw targets.
diff --git a/ld/ld.texi b/ld/ld.texi
index d0ceea1626..9bede662ad 100644
--- a/ld/ld.texi
+++ b/ld/ld.texi
@@ -961,7 +961,11 @@ Enabled by default.
@cindex input files, displaying
@item -t
@itemx --trace
-Print the names of the input files as @command{ld} processes them.
+Print the names of the input files as @command{ld} processes them. If
+@samp{-t} is given twice then members within archives are also printed.
+@samp{-t} output is useful to generate a list of all the object files
+and scripts involved in linking, for example, when packaging files for
+a linker bug report.
@kindex -T @var{script}
@kindex --script=@var{script}
--
Alan Modra
Australia Development Lab, IBM