Blame SOURCES/binutils-do-not-merge-differing-SHF_EXCLUDE-groups.patch

66b412
--- binutils.orig/ld/emultempl/elf32.em	2019-07-22 13:25:51.601030174 +0100
66b412
+++ binutils-2.32/ld/emultempl/elf32.em	2019-07-22 13:27:36.070394830 +0100
66b412
@@ -2029,10 +2029,12 @@ elf_orphan_compatible (asection *in, ase
66b412
   if (elf_section_data (out)->this_hdr.sh_info
66b412
       != elf_section_data (in)->this_hdr.sh_info)
66b412
     return FALSE;
66b412
-  /* We can't merge two sections with differing SHF_EXCLUDE when doing
66b412
-     a relocatable link.  */
66b412
+  /* We can't merge with member of output section group nor merge two
66b412
+     sections with differing SHF_EXCLUDE when doing a relocatable link.  */
66b412
   if (bfd_link_relocatable (&link_info)
66b412
-      && ((elf_section_flags (out) ^ elf_section_flags (in)) & SHF_EXCLUDE) != 0)
66b412
+      && (elf_next_in_group (out) != NULL
66b412
+	  || ((elf_section_flags (out) ^ elf_section_flags (in))
66b412
+	      & SHF_EXCLUDE) != 0))
66b412
     return FALSE;
66b412
   return _bfd_elf_match_sections_by_type (link_info.output_bfd, out,
66b412
 					  in->owner, in);