mingw-binutils/binutils-special-sections-in-groups.patch
DistroBaker c976b1ba25 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/mingw-binutils.git#d64b64711179af8e3626c00d6b8041726dc3e6d8
2020-12-18 03:26:09 +00:00

29 lines
1.2 KiB
Diff

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