aboutsummaryrefslogtreecommitdiffstats
path: root/main/musl
diff options
context:
space:
mode:
authorBreno Leitao <breno.leitao@gmail.com>2017-03-08 20:15:28 +0000
committerJakub Jirutka <jakub@jirutka.cz>2017-03-08 21:57:42 +0100
commit885866525e25c847ea5c70027386c494f99d61af (patch)
treeeaa0c79444679087c3e974b4c45001ad090c7af9 /main/musl
parentbed7a4939e578302cbb6ab130861f0894d9c3139 (diff)
downloadaports-885866525e25c847ea5c70027386c494f99d61af.tar.bz2
aports-885866525e25c847ea5c70027386c494f99d61af.tar.xz
main/musl: Fix a ppc64le loader issue
Fix a problem on ppc64le that sometimes musl crashes during the application load. The crash was found on the loader. This problem was just fixed upstream, and I am adding it back to Alpine.
Diffstat (limited to 'main/musl')
-rw-r--r--main/musl/0008-fix-ld-behavior-dependent-crash-in-ppc64-ldso-startu.patch28
-rw-r--r--main/musl/APKBUILD2
2 files changed, 30 insertions, 0 deletions
diff --git a/main/musl/0008-fix-ld-behavior-dependent-crash-in-ppc64-ldso-startu.patch b/main/musl/0008-fix-ld-behavior-dependent-crash-in-ppc64-ldso-startu.patch
new file mode 100644
index 0000000000..d8230159e7
--- /dev/null
+++ b/main/musl/0008-fix-ld-behavior-dependent-crash-in-ppc64-ldso-startu.patch
@@ -0,0 +1,28 @@
+From fc85fb38605a8bf341c367b8ab0d36edab2bdbfc Mon Sep 17 00:00:00 2001
+From: Rich Felker <dalias@aerifal.cx>
+Date: Wed, 8 Mar 2017 13:35:33 -0500
+Subject: [PATCH] fix ld-behavior-dependent crash in ppc64 ldso startup
+
+the 32-bit pc-relative address for stage 2 of dynamic linker entry was
+wrongly loaded with a zero-extending load instead of sign-extending
+load, resulting in an invalid jump if the offset happened to be
+negative, which depends on the linker's ordering of text sections.
+---
+ arch/powerpc64/reloc.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/powerpc64/reloc.h b/arch/powerpc64/reloc.h
+index e1bad00..faf70ac 100644
+--- a/arch/powerpc64/reloc.h
++++ b/arch/powerpc64/reloc.h
+@@ -27,6 +27,6 @@
+ " bl 1f \n" \
+ " .long " #sym "-. \n" \
+ "1: mflr %1 \n" \
+- " lwz %0, 0(%1) \n" \
++ " lwa %0, 0(%1) \n" \
+ " add %0, %0, %1 \n" \
+ : "=r"(*(fp)), "=r"((long){0}) : : "memory", "lr" )
+--
+1.9.3
+
diff --git a/main/musl/APKBUILD b/main/musl/APKBUILD
index 2d6002b2f8..6b748441f6 100644
--- a/main/musl/APKBUILD
+++ b/main/musl/APKBUILD
@@ -24,6 +24,7 @@ source="http://www.musl-libc.org/releases/musl-$pkgver.tar.gz
0005-treat-base-1-as-an-error-in-strtol-family-functions.patch
0006-fix-crash-from-corrupted-tls-module-list-after-faile.patch
0007-add-s390x-dlsym.patch
+ 0008-fix-ld-behavior-dependent-crash-in-ppc64-ldso-startu.patch
ldconfig
__stack_chk_fail_local.c
@@ -151,6 +152,7 @@ ea103de2721926111510116dedb10e2320715fd20563a342c1dd30f3d1e68049990924b2cf4d03fd
df96c4bd5ff9c197c8aa599948b69716587837de0f298d3adec56077b073e71a49a3c3345e0508cf8a4ed636e3171495bbbdc35435bd8e343c546436f6348359 0005-treat-base-1-as-an-error-in-strtol-family-functions.patch
4dc5cdcab11dee6b62fcb81401a816341e1d802a99e46b072c51575a2c25933354540fe22ae06dcdc85eb9a3cbf7256e7c43aab0e75843846551f9e18bfc39c2 0006-fix-crash-from-corrupted-tls-module-list-after-faile.patch
39eaf56fe30c7098c75c09567a0d990b90c1017c1c2c160017b2d5f41e6503a23d21c7b20bad0186cf3e6fec9fa28ab4f7d655a8382140186c96302f262379fe 0007-add-s390x-dlsym.patch
+4018ca56adef65df0041805b9359caba467c7f95fe40cba90dfd32333b7dab180bff519b42f8c56c55eab88a35c040bdf4882e15ce5f6dcf155d545578ab8f7b 0008-fix-ld-behavior-dependent-crash-in-ppc64-ldso-startu.patch
8d3a2d5315fc56fee7da9abb8b89bb38c6046c33d154c10d168fb35bfde6b0cf9f13042a3bceee34daf091bc409d699223735dcf19f382eeee1f6be34154f26f ldconfig
062bb49fa54839010acd4af113e20f7263dde1c8a2ca359b5fb2661ef9ed9d84a0f7c3bc10c25dcfa10bb3c5a4874588dff636ac43d5dbb3d748d75400756d0b __stack_chk_fail_local.c
0d80f37b34a35e3d14b012257c50862dfeb9d2c81139ea2dfa101d981d093b009b9fa450ba27a708ac59377a48626971dfc58e20a3799084a65777a0c32cbc7d getconf.c