* [PATCH] ld: Override the IR definition for non-ELF targets
@ 2020-09-30 12:22 H.J. Lu
2020-10-02 11:26 ` Nick Clifton
0 siblings, 1 reply; 2+ messages in thread
From: H.J. Lu @ 2020-09-30 12:22 UTC (permalink / raw)
To: binutils
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/plugin.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/ld/plugin.c b/ld/plugin.c
index 5640b8975b..067551c476 100644
--- a/ld/plugin.c
+++ b/ld/plugin.c
@@ -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))
--
2.26.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ld: Override the IR definition for non-ELF targets
2020-09-30 12:22 [PATCH] ld: Override the IR definition for non-ELF targets H.J. Lu
@ 2020-10-02 11:26 ` Nick Clifton
0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2020-10-02 11:26 UTC (permalink / raw)
To: H.J. Lu, binutils
Hi H.J.
> PR ld/26675
> * plugin.c (plugin_notice): Override the IR definition before
> all LTO symbols have been read for non-ELF targets.
Approved - please apply.
Cheers
Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-02 11:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-30 12:22 [PATCH] ld: Override the IR definition for non-ELF targets H.J. Lu
2020-10-02 11:26 ` Nick Clifton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).