Fix AArch64 in the same way as other targets updated in 8170f7693bc0a9442c0aa28019792...
[binutils-gdb.git] / bfd / linker.c
index 2f56b465cb3982c4dfdefac038a0372c3c60867f..f94d2f8f9e386faaa2ed29fb2eb8e7a8540af470 100644 (file)
@@ -1735,7 +1735,8 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
             otherwise add a warning.  */
          if ((!info->lto_plugin_active
               && (h->u.undef.next != NULL || info->hash->undefs_tail == h))
-             || h->non_ir_ref)
+             || h->non_ir_ref_regular
+             || h->non_ir_ref_dynamic)
            {
              (*info->callbacks->warning) (info, string, h->root.string,
                                           hash_entry_bfd (h), NULL, 0);
@@ -2090,7 +2091,7 @@ _bfd_generic_link_output_symbols (bfd *output_bfd,
              && bfd_hash_lookup (info->keep_hash, bfd_asymbol_name (sym),
                                  FALSE, FALSE) == NULL))
        output = FALSE;
-      else if ((sym->flags & (BSF_GLOBAL | BSF_WEAK)) != 0)
+      else if ((sym->flags & (BSF_GLOBAL | BSF_WEAK | BSF_GNU_UNIQUE)) != 0)
        {
          /* If this symbol is marked as occurring now, rather
             than at the end, output it now.  This is used for