summaryrefslogtreecommitdiff
path: root/toolchain/uClibc/uClibc-0.9.30.2-Make-use-of-macros-from-sys-asm.h-in-crt1.S.patch
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2010-02-22 22:05:41 +0100
committerPeter Korsgaard <jacmet@sunsite.dk>2010-02-22 22:05:41 +0100
commit43ffd946ad569f3a1d0662de221cd4cb65bdc8e6 (patch)
tree51a058ab53af3fd5c3d6cbe57c1f5f3cbd9b3015 /toolchain/uClibc/uClibc-0.9.30.2-Make-use-of-macros-from-sys-asm.h-in-crt1.S.patch
parentc8ff60c8283b0ad116fcf43f485f199c29432c9d (diff)
toolchain/uClibc: additional 0.9.30.2 patches
Everything on the 0_9_30 branch since the release (0.9.30.3 to be) Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'toolchain/uClibc/uClibc-0.9.30.2-Make-use-of-macros-from-sys-asm.h-in-crt1.S.patch')
-rw-r--r--toolchain/uClibc/uClibc-0.9.30.2-Make-use-of-macros-from-sys-asm.h-in-crt1.S.patch87
1 files changed, 87 insertions, 0 deletions
diff --git a/toolchain/uClibc/uClibc-0.9.30.2-Make-use-of-macros-from-sys-asm.h-in-crt1.S.patch b/toolchain/uClibc/uClibc-0.9.30.2-Make-use-of-macros-from-sys-asm.h-in-crt1.S.patch
new file mode 100644
index 000000000..25b796422
--- /dev/null
+++ b/toolchain/uClibc/uClibc-0.9.30.2-Make-use-of-macros-from-sys-asm.h-in-crt1.S.patch
@@ -0,0 +1,87 @@
+From 2911103dd4a03bbd3aad11eddfce524a5c9ba9b3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 22 Jan 2010 13:00:20 +0100
+Subject: [PATCH 03/15] Make use of macros from sys/asm.h in crt1.S
+
+Needed for mips nptl to boot once again.
+(cherry picked from commit 9c343fd4030dcd7a52616f365893177dded50346)
+
+Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
+---
+ libc/sysdeps/linux/mips/crt1.S | 46 +++++++++++----------------------------
+ 1 files changed, 13 insertions(+), 33 deletions(-)
+
+diff --git a/libc/sysdeps/linux/mips/crt1.S b/libc/sysdeps/linux/mips/crt1.S
+index e851d52..6a80412 100644
+--- a/libc/sysdeps/linux/mips/crt1.S
++++ b/libc/sysdeps/linux/mips/crt1.S
+@@ -85,29 +85,10 @@
+
+ __start:
+ #ifdef __PIC__
+-#if _MIPS_SIM == _MIPS_SIM_ABI32
+- .frame sp, 24, sp
+- .set noreorder
+- move $0, $31 /* Save old ra. */
+- bal 10f /* Find addr of cpload. */
+- nop
+-10:
+- .cpload $31
+- move $31, $0
+- .set reorder
+- .cprestore 16
+-#else
+- move $0, $31; /* Save old ra. */
+- .set noreorder
+- bal 10f /* Find addr of .cpsetup. */
+- nop
+-10:
+- .set reorder
+- .cpsetup $31, $25, 10b
+- move $31, $0
+-#endif
++ SETUP_GPX($0)
++ SETUP_GPX64($25,$0)
+ #else
+- la $28, _gp /* Setup GP correctly if we're non-PIC. */
++ PTR_LA $28, _gp /* Setup GP correctly if we're non-PIC. */
+ move $31, $0
+ #endif
+
+@@ -118,18 +99,18 @@ __start:
+ /* Allocate space on the stack for seven arguments and
+ * make sure the stack is aligned to double words (8 bytes) */
+
++ and $29, -2 * SZREG
++
+ #if _MIPS_SIM == _MIPS_SIM_ABI32
+- and $29, -2 * 4
+- subu $29, 32
+- la $7, _init /* init */
+- la $8, _fini
+- sw $8, 16($29) /* fini */
+- sw $2, 20($29) /* rtld_fini */
+- sw $29, 24($29) /* stack_end */
+-#else
+- and $29, -2 * PTRSIZE
++ PTR_SUBIU $29, 32
++#endif
+ PTR_LA $7, _init /* init */
+- PTR_LA $8, _fini /* fini */
++ PTR_LA $8, _fini
++#if _MIPS_SIM == _MIPS_SIM_ABI32
++ PTR_S $8, 16($29) /* fini */
++ PTR_S $2, 20($29) /* rtld_fini */
++ PTR_S $29, 24($29) /* stack_end */
++#else
+ move $9, $2 /* rtld_fini */
+ move $10, $29 /* stack_end */
+ #endif
+@@ -148,4 +129,3 @@ __data_start:
+ .weak data_start
+ data_start = __data_start
+
+-
+--
+1.6.6.1
+