This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

Re: Report scripts and libraries searched for ld --trace


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


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