core/binutils to 2.33.1-2.2

This commit is contained in:
Kevin Mihelich 2020-01-11 15:57:37 +00:00
parent 24e371e7bc
commit b73152a898
3 changed files with 50 additions and 4 deletions

View file

@ -1,7 +1,7 @@
From 8a49de34004f86920bb6fea16ff0784fa377d83d Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Tue, 7 Jan 2020 17:41:03 -0700
Subject: [PATCH] AArch64: Set the correct ELF class for AArch64 stubs
Subject: [PATCH 1/2] AArch64: Set the correct ELF class for AArch64 stubs
(PR/25210)
This fixes PR 25210 by specifying the the correct ELF class for AArch64 stubs.

View file

@ -0,0 +1,43 @@
From e9d91c4ffc108af0a6df45ab6d4cd4792ecb36c7 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Sat, 11 Jan 2020 08:36:04 -0700
Subject: [PATCH 2/2] AArch64: Revert setting of elf class in linker stub.
This changes the fix to PR 25210 by removing the ELF class change.
As it turns out the correct change was only the change in compress.c.
Everything else is unneeded and setting the elf class is making the linker
behave very oddly under LTO. The first stub is correctly written out but for
the rest the suddenly don't have a pointer to the stub section anymore.
This caused SPEC to fail as the program would branch to the stub and it wouldn't
be filled in.
Committed to master under the trivial rule as this is partially reverting a previous commit.
bfd/ChangeLog:
PR 25210
* elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Remove elfclass.
---
bfd/elfnn-aarch64.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index 6b1b7b55e4..fd44505da4 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -3176,10 +3176,6 @@ _bfd_aarch64_create_stub_section (asection *section,
if (s_name == NULL)
return NULL;
- /* PR 25210. Set the right class on the stub_bfd. */
- elf_elfheader (htab->stub_bfd)->e_ident[EI_CLASS] = ELFCLASSNN;
- BFD_ASSERT (ELFCLASSNN == get_elf_backend_data (htab->stub_bfd)->s->elfclass);
-
memcpy (s_name, section->name, namelen);
memcpy (s_name + namelen, STUB_SUFFIX, sizeof (STUB_SUFFIX));
return (*htab->add_stub_section) (s_name, section);
--
2.24.1

View file

@ -12,7 +12,7 @@ noautobuild=1
pkgname=binutils
pkgver=2.33.1
pkgrel=2.1
pkgrel=2.2
pkgdesc='A set of programs to assemble and manipulate binary and object files'
arch=(x86_64)
url='https://www.gnu.org/software/binutils/'
@ -22,11 +22,13 @@ depends=(glibc zlib)
checkdepends=(dejagnu bc)
options=(staticlibs !distcc !ccache)
source=(https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz{,.sig}
0001-AArch64-Set-the-correct-ELF-class-for-AArch64-stubs-.patch)
0001-AArch64-Set-the-correct-ELF-class-for-AArch64-stubs-.patch
0002-AArch64-Revert-setting-of-elf-class-in-linker-stub.patch)
validpgpkeys=(3A24BC1E8FB409FA9F14371813FCEF89DD9E3C4F)
md5sums=('9406231b7d9dd93731c2d06cefe8aaf1'
'SKIP'
'31bfcff30555ae95d71a7bf5ef71d294')
'806e91eb3ea6a539ecf1af445114e497'
'11f2e62e227f5afba086301df681f1c7')
prepare() {
mkdir -p binutils-build
@ -38,6 +40,7 @@ prepare() {
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
patch -Np1 -i ../0001-AArch64-Set-the-correct-ELF-class-for-AArch64-stubs-.patch
patch -Np1 -i ../0002-AArch64-Revert-setting-of-elf-class-in-linker-stub.patch
}
build() {