aboutsummaryrefslogtreecommitdiff
path: root/bfd/linker.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2014-08-12 10:31:41 +0930
committerAlan Modra <amodra@gmail.com>2014-08-12 10:31:41 +0930
commit61f41c3c243bbcc0ab2e5adb3157ce00dc11fc27 (patch)
tree263819710f1f69db79253b1253e037843e69531e /bfd/linker.c
parentd769e349bc2c28261d4b2391b58eb7dc3f452e99 (diff)
downloadfsf-binutils-gdb-61f41c3c243bbcc0ab2e5adb3157ce00dc11fc27.zip
fsf-binutils-gdb-61f41c3c243bbcc0ab2e5adb3157ce00dc11fc27.tar.gz
fsf-binutils-gdb-61f41c3c243bbcc0ab2e5adb3157ce00dc11fc27.tar.bz2
Fix non-plugin warning symbol handling
PR ld/16746 include/ * bfdlink.h (struct bfd_link_info): Add lto_plugin_active. bfd/ * linker.c (_bfd_generic_link_add_one_symbol <WARN>): Handle !lto_plugin_active. ld/ * plugin.c (plugin_load_plugins): Set link_info.lto_plugin_active.
Diffstat (limited to 'bfd/linker.c')
-rw-r--r--bfd/linker.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bfd/linker.c b/bfd/linker.c
index d4b053c..1a5ecef 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -1806,7 +1806,9 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
case WARN:
/* Warn if this symbol has been referenced already from non-IR,
otherwise add a warning. */
- if (h->non_ir_ref)
+ if ((!info->lto_plugin_active
+ && (h->u.undef.next != NULL || info->hash->undefs_tail == h))
+ || h->non_ir_ref)
{
if (! (*info->callbacks->warning) (info, string, h->root.string,
hash_entry_bfd (h), NULL, 0))