]> Git Repo - binutils.git/commitdiff
ld: Override the IR definition for non-ELF targets
authorH.J. Lu <[email protected]>
Wed, 30 Sep 2020 12:23:20 +0000 (05:23 -0700)
committerH.J. Lu <[email protected]>
Wed, 30 Sep 2020 12:23:35 +0000 (05:23 -0700)
For non-ELF targets, override the IR definition before all LTO symbols
have been read.

PR ld/26675
* plugin.c (plugin_notice): Override the IR definition before
all LTO symbols have been read for non-ELF targets.

ld/ChangeLog
ld/plugin.c

index 369252761cc67f9118eb8372b8367e9e7605f2e2..134db8cdac80b628565cee29fba6676927e7fc12 100644 (file)
@@ -1,3 +1,9 @@
+2020-09-30  H.J. Lu  <[email protected]>
+
+       PR ld/26675
+       * plugin.c (plugin_notice): Override the IR definition before
+       all LTO symbols have been read for non-ELF targets.
+
 2020-09-30  Jeremy Drake  <[email protected]>
 
        PR 26588
index 5640b8975b998bc0adb14340a16792beaae78ee4..067551c4766829795b95d22fe8d12c82852a7c2d 100644 (file)
@@ -1436,8 +1436,10 @@ plugin_notice (struct bfd_link_info *info,
         this by making the symbol appear to be undefined.
 
         NB: We change the previous definition in the IR object to
-        undefweak only after all LTO symbols have been read.  */
-      else if (info->lto_all_symbols_read
+        undefweak only after all LTO symbols have been read or for
+        non-ELF targets.  */
+      else if ((info->lto_all_symbols_read
+               || bfd_get_flavour (abfd) != bfd_target_elf_flavour)
               && (((h->type == bfd_link_hash_defweak
                     || h->type == bfd_link_hash_defined)
                    && is_ir_dummy_bfd (sym_bfd = h->u.def.section->owner))
This page took 0.034529 seconds and 4 git commands to generate.