[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/24267] ld discards a symbol with -flto and -static
From: |
marxin.liska at gmail dot com |
Subject: |
[Bug ld/24267] ld discards a symbol with -flto and -static |
Date: |
Thu, 28 Feb 2019 12:40:23 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=24267
--- Comment #11 from Martin Liška <marxin.liska at gmail dot com> ---
I've got a patch candidate that can solve it:
diff --git a/bfd/coffgen.c b/bfd/coffgen.c
index 309e1249ac..1d200b066b 100644
--- a/bfd/coffgen.c
+++ b/bfd/coffgen.c
@@ -2678,9 +2678,9 @@ _bfd_coff_section_already_linked (bfd *abfd,
and match any comdat section with comdat name of <key>, and
any linkonce section with the same suffix, ie.
.gnu.linkonce.*.<key>. */
- if (((s_comdat != NULL) == (l_comdat != NULL)
- && strcmp (name, l->sec->name) == 0)
- || (l->sec->owner->flags & BFD_PLUGIN) != 0)
+ if (((s_comdat != NULL) == (l_comdat != NULL))
+ && ((strcmp (name, l->sec->name) == 0)
+ || (l->sec->owner->flags & BFD_PLUGIN) != 0))
{
/* The section has already been linked. See if we should
issue a warning. */
However, Honza is still thinking that LDPR_PREVAILING_DEF_IRONLY should be used
for the symbol. If I see correctly it's set in ld/plugin.c base on
else if (owner_sec->owner == abfd).
Can you please help me where sections are set for each symbol? Is it a COFF
specific code?
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/24267] ld discards a symbol with -flto and -static, (continued)
- [Bug ld/24267] ld discards a symbol with -flto and -static, marxin.liska at gmail dot com, 2019/02/25
- [Bug ld/24267] ld discards a symbol with -flto and -static, hjl.tools at gmail dot com, 2019/02/25
- [Bug ld/24267] ld discards a symbol with -flto and -static, marxin.liska at gmail dot com, 2019/02/25
- [Bug ld/24267] ld discards a symbol with -flto and -static, hjl.tools at gmail dot com, 2019/02/25
- [Bug ld/24267] ld discards a symbol with -flto and -static, hp at tmm dot cx, 2019/02/26
- [Bug ld/24267] ld discards a symbol with -flto and -static, marxin.liska at gmail dot com, 2019/02/26
- [Bug ld/24267] ld discards a symbol with -flto and -static, marxin.liska at gmail dot com, 2019/02/27
- [Bug ld/24267] ld discards a symbol with -flto and -static, marxin.liska at gmail dot com, 2019/02/27
- [Bug ld/24267] ld discards a symbol with -flto and -static, freddy77 at gmail dot com, 2019/02/27
- [Bug ld/24267] ld discards a symbol with -flto and -static, marxin.liska at gmail dot com, 2019/02/27
- [Bug ld/24267] ld discards a symbol with -flto and -static,
marxin.liska at gmail dot com <=
- [Bug ld/24267] ld discards a symbol with -flto and -static, hjl.tools at gmail dot com, 2019/02/28
- [Bug ld/24267] ld discards a symbol with -flto and -static, marxin.liska at gmail dot com, 2019/02/28
- [Bug ld/24267] ld discards a symbol with -flto and -static, hjl.tools at gmail dot com, 2019/02/28
- [Bug ld/24267] ld discards a symbol with -flto and -static, marxin.liska at gmail dot com, 2019/02/28
- [Bug ld/24267] ld discards a symbol with -flto and -static, hjl.tools at gmail dot com, 2019/02/28
- [Bug ld/24267] ld discards a symbol with -flto and -static, hjl.tools at gmail dot com, 2019/02/28