From 8798235ddbf98fc7d2d1b61dc3902156e92bf0c6 Mon Sep 17 00:00:00 2001 From: Johnny Hughes Date: May 07 2020 20:24:43 +0000 Subject: build on armhfp --- diff --git a/SOURCES/binutils-special-sections-in-groups.patch b/SOURCES/binutils-special-sections-in-groups.patch new file mode 100644 index 0000000..7010332 --- /dev/null +++ b/SOURCES/binutils-special-sections-in-groups.patch @@ -0,0 +1,27 @@ +--- 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 diff --git a/SPECS/binutils.spec b/SPECS/binutils.spec index fa871c9..63954df 100644 --- a/SPECS/binutils.spec +++ b/SPECS/binutils.spec @@ -431,6 +431,9 @@ Patch66: binutils-CVE-2019-17450.patch # Lifetime: Fixed in 2.35 Patch67: binutils-copy-multiple-relocs.patch +Patch9999: binutils-special-sections-in-groups.patch + + #---------------------------------------------------------------------------- Provides: bundled(libiberty) @@ -623,6 +626,10 @@ using libelf instead of BFD. %patch66 -p1 %patch67 -p1 +%ifarch %{arm} +%patch9999 -p1 +%endif + # 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 ?