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

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