[Patch] PR 26198 Failure to merge read only data of machine code object file and LTO object file on MinGW

Alan Modra amodra@gmail.com
Mon Jul 13 00:48:12 GMT 2020


On Thu, Jul 09, 2020 at 11:08:51PM +0200, Markus Böck via Binutils wrote:
> --- 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.  */

The patch makes sense to me.  Have you tested it with a mingw gcc
build, lto enabled of course, confirming no gcc testsuite regressions?

-- 
Alan Modra
Australia Development Lab, IBM


More information about the Binutils mailing list