summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-03 16:58:41 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-03 16:58:41 +0000
commitfeb64b7c56db18814c78f130fd2ea567a411060b (patch)
treeb2500761fbaa67e7005dd6972e3a4544d39398d4
parent308f526a78246cd99bcd50ada27c3c5b63a0cf29 (diff)
downloadpackages-feb64b7c56db18814c78f130fd2ea567a411060b.tar.gz
packages-feb64b7c56db18814c78f130fd2ea567a411060b.tar.bz2
packages-feb64b7c56db18814c78f130fd2ea567a411060b.tar.xz
packages-feb64b7c56db18814c78f130fd2ea567a411060b.zip
system/binutils: fix upstream 25056 (ARM PIE bug)
-rw-r--r--system/binutils/APKBUILD4
-rw-r--r--system/binutils/arm-pie.patch24
2 files changed, 27 insertions, 1 deletions
diff --git a/system/binutils/APKBUILD b/system/binutils/APKBUILD
index 8304e5c7d..682f2e93c 100644
--- a/system/binutils/APKBUILD
+++ b/system/binutils/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Adelie Platform Group <adelie-devel@lists.adelielinux.org>
pkgname=binutils
pkgver=2.32
-pkgrel=3
+pkgrel=4
pkgdesc="Tools necessary to build programs"
url="https://www.gnu.org/software/binutils/"
depends=""
@@ -15,6 +15,7 @@ subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-libs"
# non-PIC is unsupported by musl/ppc
[ "${CARCH}" != "ppc" ] || options='!check'
source="https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz
+ arm-pie.patch
binutils-ld-fix-static-linking.patch
disable-gnu-mbind.patch
disable-ifunc-tests.patch
@@ -140,6 +141,7 @@ libs() {
}
sha512sums="d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a binutils-2.32.tar.xz
+2f862c473b357effe63221a47c4a34893eff50e4ab3c7b500b19754f3c7bf81ee695c35e5ce16f6c6fcd75696d270d04f282ae4c7d32b42a61b667ff1eccce8f arm-pie.patch
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
d378fdf1964f8f2bd0b1e62827ac5884bdf943aa435ec89c29fc84bb045d406b733fffaff8fdd8bd1cba8ddea7701c4cf6ccf3ed76a8a3df9c72b447737575a6 disable-gnu-mbind.patch
474ab24097bbb5b24433620549e5234fe65c547824c1342f693c718ffbc81e2d968259cce2d650b55200dd1ec89da207ea2db10c551cd9941285c4600b4297b2 disable-ifunc-tests.patch
diff --git a/system/binutils/arm-pie.patch b/system/binutils/arm-pie.patch
new file mode 100644
index 000000000..f42477a04
--- /dev/null
+++ b/system/binutils/arm-pie.patch
@@ -0,0 +1,24 @@
+Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=25056
+Author: Rich Felker <dalias@libc.org>
+Upstream-Status: reported
+
+--- binutils-2.32/bfd/elf32-arm.c.orig 2019-10-02 07:47:36.153918869 -0400
++++ binutils-2.32/bfd/elf32-arm.c 2019-10-02 08:37:09.108263016 -0400
+@@ -11624,7 +11624,7 @@
+ {
+ /* If we don't know the module number, create a relocation
+ for it. */
+- if (bfd_link_pic (info))
++ if (bfd_link_dll (info))
+ {
+ Elf_Internal_Rela outrel;
+
+@@ -11728,7 +11728,7 @@
+ now, and emit any relocations. If both an IE GOT and a
+ GD GOT are necessary, we emit the GD first. */
+
+- if ((bfd_link_pic (info) || indx != 0)
++ if ((bfd_link_dll (info) || indx != 0)
+ && (h == NULL
+ || (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ && !resolved_to_zero)