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

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