changeset 1829:c2e158a22d2b

Workaround for the musl mips segfaults.
author Rob Landley <rob@landley.net>
date Tue, 15 Dec 2015 15:10:39 -0600
parents 297a5d07c73b
children 2c312362813d
files sources/patches/musl-mips.patch
diffstat 1 files changed, 24 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sources/patches/musl-mips.patch	Tue Dec 15 15:10:39 2015 -0600
@@ -0,0 +1,24 @@
+Workaround for binutils 2.17 linking things on mips in a way musl doesn't like.
+
+diff --git a/arch/mips/crt_arch.h b/arch/mips/crt_arch.h
+index 21e139b..f4ba02a 100644
+--- a/arch/mips/crt_arch.h
++++ b/arch/mips/crt_arch.h
+@@ -4,13 +4,16 @@ __asm__(
+ ".text \n"
+ ".global _" START "\n"
+ ".global " START "\n"
++".global " START "_data\n"
+ ".type   _" START ", @function\n"
+ ".type   " START ", @function\n"
++".type   " START "_data, @function\n"
+ "_" START ":\n"
+ "" START ":\n"
+ "	bal 1f \n"
+ "	 move $fp, $0 \n"
+-"2:	.gpword 2b \n"
++"" START "_data: \n"
++"	.gpword " START "_data \n"
+ "	.gpword " START "_c \n"
+ ".weak _DYNAMIC \n"
+ ".hidden _DYNAMIC \n"