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

e89428
diff -rupN --no-dereference binutils-2.37/bfd/elf.c binutils-2.37-new/bfd/elf.c
e89428
--- binutils-2.37/bfd/elf.c	2021-07-08 13:37:19.000000000 +0200
e89428
+++ binutils-2.37-new/bfd/elf.c	2021-07-24 21:59:16.679826669 +0200
e89428
@@ -824,7 +824,13 @@ setup_group (bfd *abfd, Elf_Internal_Shd
e89428
 	}
e89428
     }
e89428
 
e89428
-  if (elf_group_name (newsect) == NULL)
e89428
+  if (elf_group_name (newsect) == NULL
e89428
+      /* OS specific sections might be in a group (eg ARM's ARM_EXIDX section)
e89428
+	 but they will not have been added to the group because they do not
e89428
+	 have contents that the ELF code in the BFD library knows how to
e89428
+	 process.  This is OK though - we rely upon the target backends to
e89428
+	 handle these sections for us.  */
e89428
+      && hdr->sh_type < SHT_LOOS)
e89428
     {
e89428
       /* xgettext:c-format */
e89428
       _bfd_error_handler (_("%pB: no group info for section '%pA'"),
e89428
@@ -927,7 +933,8 @@ _bfd_elf_setup_sections (bfd *abfd)
e89428
 	  else if (idx->shdr->bfd_section)
e89428
 	    elf_sec_group (idx->shdr->bfd_section) = shdr->bfd_section;
e89428
 	  else if (idx->shdr->sh_type != SHT_RELA
e89428
-		   && idx->shdr->sh_type != SHT_REL)
e89428
+		   && idx->shdr->sh_type != SHT_REL
e89428
+		   && idx->shdr->sh_type < SHT_LOOS)
e89428
 	    {
e89428
 	      /* There are some unknown sections in the group.  */
e89428
 	      _bfd_error_handler