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: Make no-copy-dt-needed default?


Hi,

On Tue, 16 Aug 2011, Ian Lance Taylor wrote:

> > So, should I propose a patch?
> 
> Obviously I think it makes sense.

Something like this then (no regressions on x86_64-linux).


Ciao,
Michael.
-- 
	* ldmain.c (add_DT_NEEDED_for_dynamic): Default to FALSE.
	* ld.texinfo (--copy-dt-needed-entries): Mention new default.

Index: ld.texinfo
===================================================================
RCS file: /cvs/src/src/ld/ld.texinfo,v
retrieving revision 1.279
diff -u -p -r1.279 ld.texinfo
--- ld.texinfo	9 Aug 2011 13:10:44 -0000	1.279
+++ ld.texinfo	16 Aug 2011 15:58:50 -0000
@@ -1258,21 +1258,20 @@ option.
 @itemx --no-copy-dt-needed-entries
 This option affects the treatment of dynamic libraries referred to 
 by DT_NEEDED tags @emph{inside} ELF dynamic libraries mentioned on the
-command line.  Normally the linker will add a DT_NEEDED tag to the
+command line.  Normally the linker won't add a DT_NEEDED tag to the
 output binary for each library mentioned in a DT_NEEDED tag in an
-input dynamic library.  With @option{--no-copy-dt-needed-entries}
+input dynamic library.  With @option{--copy-dt-needed-entries}
 specified on the command line however any dynamic libraries that
-follow it will have their DT_NEEDED entries ignored.  The default
-behaviour can be restored with @option{--copy-dt-needed-entries}.
+follow it will have their DT_NEEDED entries added.  The default
+behaviour can be restored with @option{--no-copy-dt-needed-entries}.
 
 This option also has an effect on the resolution of symbols in dynamic
-libraries.  With the default setting dynamic libraries mentioned on
-the command line will be recursively searched, following their
-DT_NEEDED tags to other libraries, in order to resolve symbols
-required by the output binary.  With
-@option{--no-copy-dt-needed-entries} specified however the searching
-of dynamic libraries that follow it will stop with the dynamic
-library itself.  No DT_NEEDED links will be traversed to resolve
+libraries.  With @option{--copy-dt-needed-entries} dynamic libraries
+mentioned on the command line will be recursively searched, following
+their DT_NEEDED tags to other libraries, in order to resolve symbols
+required by the output binary.  With the default setting however
+the searching of dynamic libraries that follow it will stop with the
+dynamic library itself.  No DT_NEEDED links will be traversed to resolve
 symbols.
 
 @cindex cross reference table
Index: ldmain.c
===================================================================
RCS file: /cvs/src/src/ld/ldmain.c,v
retrieving revision 1.158
diff -u -p -r1.158 ldmain.c
--- ldmain.c	4 Aug 2011 20:47:46 -0000	1.158
+++ ldmain.c	16 Aug 2011 15:58:50 -0000
@@ -105,7 +105,7 @@ bfd_boolean add_DT_NEEDED_for_regular;
 /* True means create DT_NEEDED entries for dynamic libraries that
    are DT_NEEDED by dynamic libraries specifically mentioned on
    the command line.  */
-bfd_boolean add_DT_NEEDED_for_dynamic = TRUE;
+bfd_boolean add_DT_NEEDED_for_dynamic;
 
 /* TRUE if we should demangle symbol names.  */
 bfd_boolean demangling;


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