This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: --as-needed change wrt undefined weak symbols
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: binutils at sourceware dot org, Pierre Ossman <ossman at cendio dot se>
- Date: Mon, 14 Jan 2013 07:30:54 -0800
- Subject: Re: --as-needed change wrt undefined weak symbols
- References: <20130114035805.GF3244@bubble.grove.modra.org>
On Sun, Jan 13, 2013 at 7:58 PM, Alan Modra <amodra@gmail.com> wrote:
> Does anyone have objections or serious reservations on changing
> --as-needed to require a strong reference? I'm in favour of excluding
> weak references as that more closely follows the rules for ld
> extracting objects from archives.
>
> Now that http://sourceware.org/ml/binutils/2013-01/msg00165.html and
> http://sourceware.org/ml/binutils/2013-01/msg00186.html have gone in I
> think the following is all we need.
>
> bfd/
> PR ld/12549
> elflink.c (elf_link_add_object_symbols): Exclude weak refs when
> considering whether an --as-needed library is needed.
> ld/
> * ld.texinfo (--as-needed): Update.
> ld/testsuite/
> * ld-elf/pr14862.out: Expect no output.
>
Given then the behavior of pr14862 is changed,
I don't think it is a good idea.
--
H.J.