This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: RFC: Rename --add-needed to --copy-dt-needed-entries
On Fri, Nov 6, 2009 at 7:44 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Thu, Nov 5, 2009 at 7:36 AM, Nick Clifton <nickc@redhat.com> wrote:
>> Hi Guys,
>>
>>> ld/ChangeLog
>>> 2009-10-28 ?Nick Clifton ?<nickc@redhat.com>
>>>
>>> ? ? ? ?* lexsup.c: Rename --add-needed to --copy-dt-needed-entries.
>>> ? ? ? ?* ldlang.h (struct lang_input_statement_struct): Rename add_needed
>>> ? ? ? ?to add_DT_NEEDED_for_dynamic. ?Rename as_needed to
>>> ? ? ? ?add_DT_NEEDED_for_regular.
>>> ? ? ? ?* ldlang.c: Likewise.
>>> ? ? ? ?* ldlang.h: Likewise.
>>> ? ? ? ?* ldlang.c: Use the new variable names.
>>> ? ? ? ?* ldgram.y: Likewise.
>>> ? ? ? ?* emultempl/elf32.em: Likewise.
>>> ? ? ? ?* ld.texinfo: Document the renamed option. ?Also mention its
>>> ? ? ? ?affect on the resolution of dynamic symbols.
>>> ? ? ? ?* NEWS: Mention the changed option name.
>>
>> I have received no objections to this, so I have gone ahead and checked it
>> in.
>>
>
> This breaks the linker:
>
> http://sourceware.org/bugzilla/show_bug.cgi?id=10912
>
The bug is in:
diff -c -3 -p -r1.139 ldmain.c
*** ld/ldmain.c 11 Sep 2009 15:27:35 -0000 1.139
--- ld/ldmain.c 28 Oct 2009 17:03:08 -0000
*************** bfd_boolean version_printed;
*** 93,105 ****
/* Nonzero means link in every member of an archive. */
bfd_boolean whole_archive;
! /* Nonzero means create DT_NEEDED entries only if a dynamic library
! actually satisfies some reference in a regular object. */
! bfd_boolean as_needed;
!
! /* Nonzero means never create DT_NEEDED entries for dynamic libraries
! in DT_NEEDED tags. */
! bfd_boolean add_needed = TRUE;
/* TRUE if we should demangle symbol names. */
bfd_boolean demangling;
--- 93,106 ----
/* Nonzero means link in every member of an archive. */
bfd_boolean whole_archive;
! /* True means only create DT_NEEDED entries for dynamic libraries
! if they actually satisfy some reference in a regular object. */
! 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 if we should demangle symbol names. */
bfd_boolean demangling;
It changes the default for add_needed/add_DT_NEEDED_for_dynamic.
I will check in this patch soon.
--
H.J.
--
Index: ldmain.c
===================================================================
RCS file: /cvs/src/src/ld/ldmain.c,v
retrieving revision 1.140
diff -u -p -r1.140 ldmain.c
--- ldmain.c 5 Nov 2009 15:35:50 -0000 1.140
+++ ldmain.c 6 Nov 2009 15:48:38 -0000
@@ -100,7 +100,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;
+bfd_boolean add_DT_NEEDED_for_dynamic = TRUE;
/* TRUE if we should demangle symbol names. */
bfd_boolean demangling;