Fix non-plugin warning symbol handling
[deliverable/binutils-gdb.git] / bfd / linker.c
index d4b053c9c6f905dffc7b1e7044fe9a90078fe599..1a5ecef8480279f7dc9e43f5014bcce35551de95 100644 (file)
@@ -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))
This page took 0.025202 seconds and 4 git commands to generate.