diff options
author | Alan Modra <amodra@bigpond.net.au> | 2013-03-18 02:47:00 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2013-03-18 02:47:00 +0000 |
commit | 879707c642925947e156b7ae2169b89f844532cd (patch) | |
tree | 9852b60de6274027f79d76e5caf52f299e1a6c11 /bfd/elflink.c | |
parent | 08d0cad39e31083cb8a885703604f7b20d359849 (diff) | |
download | binutils-redhat-879707c642925947e156b7ae2169b89f844532cd.tar.gz |
PR ld/12549
bfd/
* 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.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index ba65f21aaa..8055d26ed7 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -4482,10 +4482,10 @@ error_free_dyn: if (!add_needed && definition && ((dynsym - && h->ref_regular + && h->ref_regular_nonweak && (undef_bfd == NULL || (undef_bfd->flags & BFD_PLUGIN) == 0)) - || (h->ref_dynamic + || (h->ref_dynamic_nonweak && (elf_dyn_lib_class (abfd) & DYN_AS_NEEDED) != 0 && !on_needed_list (elf_dt_name (abfd), htab->needed)))) { |