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

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