Blame SOURCES/binutils-special-sections-in-groups.patch

d1152b
--- binutils.orig/bfd/elf.c	2018-10-19 11:42:10.107277490 +0100
d1152b
+++ binutils-2.31.1/bfd/elf.c	2018-10-19 11:44:33.607105801 +0100
d1152b
@@ -830,7 +830,13 @@ setup_group (bfd *abfd, Elf_Internal_Shd
d1152b
 	}
d1152b
     }
d1152b
 
d1152b
-  if (elf_group_name (newsect) == NULL)
d1152b
+  if (elf_group_name (newsect) == NULL
d1152b
+      /* OS specific sections might be in a group (eg ARM's ARM_EXIDX section)
d1152b
+	 but they will not have been added to the group because they do not
d1152b
+	 have contents that the ELF code in the BFD library knows how to
d1152b
+	 process.  This is OK though - we rely upon the target backends to
d1152b
+	 handle these sections for us.  */
d1152b
+      && hdr->sh_type < SHT_LOOS)
d1152b
     {
d1152b
       /* xgettext:c-format */
d1152b
       _bfd_error_handler (_("%pB: no group info for section '%pA'"),
d1152b
@@ -936,7 +942,8 @@ _bfd_elf_setup_sections (bfd *abfd)
d1152b
 	  else if (idx->shdr->bfd_section)
d1152b
 	    elf_sec_group (idx->shdr->bfd_section) = shdr->bfd_section;
d1152b
 	  else if (idx->shdr->sh_type != SHT_RELA
d1152b
-		   && idx->shdr->sh_type != SHT_REL)
d1152b
+		   && idx->shdr->sh_type != SHT_REL
d1152b
+		   && idx->shdr->sh_type < SHT_LOOS)
d1152b
 	    {
d1152b
 	      /* There are some unknown sections in the group.  */
d1152b
 	      _bfd_error_handler