aboutsummaryrefslogtreecommitdiff
path: root/bfd/coffgen.c
diff options
context:
space:
mode:
authorMarkus Böck <markus.boeck02@gmail.com>2020-07-15 08:31:30 +0930
committerAlan Modra <amodra@gmail.com>2020-07-15 08:31:30 +0930
commite8a83e931e09357437c29093ffeeab2afc79ad5c (patch)
tree762fbd4c9217827717358f64a6964b77df7b3dfa /bfd/coffgen.c
parent8e58ef803cf752cbde547a5064540f05470ea714 (diff)
downloadgdb-e8a83e931e09357437c29093ffeeab2afc79ad5c.zip
gdb-e8a83e931e09357437c29093ffeeab2afc79ad5c.tar.gz
gdb-e8a83e931e09357437c29093ffeeab2afc79ad5c.tar.bz2
PR26198 MinGW failure to link regular object file and LTO object file
PR 26198 * coffgen.c (_bfd_coff_section_already_linked): Allow for plugin objects both before and after normal object files. * elflink.c (_bfd_elf_section_already_linked): Likewise.
Diffstat (limited to 'bfd/coffgen.c')
-rw-r--r--bfd/coffgen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/coffgen.c b/bfd/coffgen.c
index 3291b69..d49b2ff 100644
--- a/bfd/coffgen.c
+++ b/bfd/coffgen.c
@@ -2662,7 +2662,8 @@ _bfd_coff_section_already_linked (bfd *abfd,
.gnu.linkonce.*.<key>. */
if (((s_comdat != NULL) == (l_comdat != NULL)
&& strcmp (name, l->sec->name) == 0)
- || (l->sec->owner->flags & BFD_PLUGIN) != 0)
+ || (l->sec->owner->flags & BFD_PLUGIN) != 0
+ || (sec->owner->flags & BFD_PLUGIN) != 0)
{
/* The section has already been linked. See if we should
issue a warning. */