]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR26198 MinGW failure to link regular object file and LTO object file
authorMarkus Böck <markus.boeck02@gmail.com>
Tue, 14 Jul 2020 23:01:30 +0000 (08:31 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 14 Jul 2020 23:01:30 +0000 (08:31 +0930)
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.

bfd/ChangeLog
bfd/coffgen.c
bfd/elflink.c

index 3cb4881febc9d9b9b072c96143a6d75a5d4a9d6a..813e3f219bfc7dc96d4a81903e3ef355cbdf2efd 100644 (file)
@@ -1,3 +1,11 @@
+2020-07-15  Markus Böck  <markus.boeck02@gmail.com>
+           Alan Modra  <amodra@gmail.com>
+
+       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.
+
 2020-07-10  Alan Modra  <amodra@gmail.com>
 
        * elf64-ppc.h (struct ppc64_elf_params): Add power10_stubs.
index 3291b693eb0b00f3dd0f3a876c63ab9a3742de40..d49b2ff201ebf48fe5293b8f70e220db3a314c40 100644 (file)
@@ -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.  */
index 998b72f2281c5b9b5482795b9b55dfffe284ee23..6978df56db3676f39949b94e4a9c55c648a8ab31 100644 (file)
@@ -14534,7 +14534,8 @@ _bfd_elf_section_already_linked (bfd *abfd,
       if (((flags & SEC_GROUP) == (l->sec->flags & SEC_GROUP)
           && ((flags & SEC_GROUP) != 0
               || 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.  */