Skip to content
Snippets Groups Projects
Commit c48b9a50 authored by Pablo Greco's avatar Pablo Greco
Browse files

Allow OS specific sections in section groups

parent 869a11cc
No related branches found
No related tags found
No related merge requests found
--- binutils.orig/bfd/elf.c 2018-10-19 11:42:10.107277490 +0100
+++ binutils-2.31.1/bfd/elf.c 2018-10-19 11:44:33.607105801 +0100
@@ -828,7 +828,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 (_("%B: no group info for section '%A'"),
@@ -934,7 +940,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
......@@ -354,6 +354,10 @@ Patch50: binutils-x86_64-ibt-enabled-tlsdesc.patch
# Lifetime: Maybe fixed in 2.32.
Patch51: binutils-gold-8-byte-note-segments.patch
# Purpose: Allow OS specific sections in section groups.
# Lifetime: Might be fixed in 2.33
Patch9999: binutils-special-sections-in-groups.patch
#----------------------------------------------------------------------------
Provides: bundled(libiberty)
......@@ -530,6 +534,8 @@ using libelf instead of BFD.
%patch50 -p1
%patch51 -p1
%patch9999 -p1
# We cannot run autotools as there is an exact requirement of autoconf-2.59.
# FIXME - this is no longer true. Maybe try reinstating autotool use ?
......@@ -961,6 +967,9 @@ exit 0
#----------------------------------------------------------------------------
%changelog
* Mon May 20 2019 Pablo Greco <pgreco@centosproject.org> - 2.30-49
- Fix bad linking in armhfp
* Tue Oct 09 2018 Nick Clifton <nickc@redhat.com> - 2.30-49
- Have the GOLD linker produce 8-byte aligned GNU Property notes. (#1614908)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment