1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/uClibc/0.9.30.2/160-Make-use-of-macros-from-sys-asm.h-in-crt1.S.patch Thu Nov 17 01:14:12 2011 +0100
1.3 @@ -0,0 +1,87 @@
1.4 +From 2911103dd4a03bbd3aad11eddfce524a5c9ba9b3 Mon Sep 17 00:00:00 2001
1.5 +From: Khem Raj <raj.khem@gmail.com>
1.6 +Date: Fri, 22 Jan 2010 13:00:20 +0100
1.7 +Subject: [PATCH 03/15] Make use of macros from sys/asm.h in crt1.S
1.8 +
1.9 +Needed for mips nptl to boot once again.
1.10 +(cherry picked from commit 9c343fd4030dcd7a52616f365893177dded50346)
1.11 +
1.12 +Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
1.13 +---
1.14 + libc/sysdeps/linux/mips/crt1.S | 46 +++++++++++----------------------------
1.15 + 1 files changed, 13 insertions(+), 33 deletions(-)
1.16 +
1.17 +diff --git a/libc/sysdeps/linux/mips/crt1.S b/libc/sysdeps/linux/mips/crt1.S
1.18 +index e851d52..6a80412 100644
1.19 +--- a/libc/sysdeps/linux/mips/crt1.S
1.20 ++++ b/libc/sysdeps/linux/mips/crt1.S
1.21 +@@ -85,29 +85,10 @@
1.22 +
1.23 + __start:
1.24 + #ifdef __PIC__
1.25 +-#if _MIPS_SIM == _MIPS_SIM_ABI32
1.26 +- .frame sp, 24, sp
1.27 +- .set noreorder
1.28 +- move $0, $31 /* Save old ra. */
1.29 +- bal 10f /* Find addr of cpload. */
1.30 +- nop
1.31 +-10:
1.32 +- .cpload $31
1.33 +- move $31, $0
1.34 +- .set reorder
1.35 +- .cprestore 16
1.36 +-#else
1.37 +- move $0, $31; /* Save old ra. */
1.38 +- .set noreorder
1.39 +- bal 10f /* Find addr of .cpsetup. */
1.40 +- nop
1.41 +-10:
1.42 +- .set reorder
1.43 +- .cpsetup $31, $25, 10b
1.44 +- move $31, $0
1.45 +-#endif
1.46 ++ SETUP_GPX($0)
1.47 ++ SETUP_GPX64($25,$0)
1.48 + #else
1.49 +- la $28, _gp /* Setup GP correctly if we're non-PIC. */
1.50 ++ PTR_LA $28, _gp /* Setup GP correctly if we're non-PIC. */
1.51 + move $31, $0
1.52 + #endif
1.53 +
1.54 +@@ -118,18 +99,18 @@ __start:
1.55 + /* Allocate space on the stack for seven arguments and
1.56 + * make sure the stack is aligned to double words (8 bytes) */
1.57 +
1.58 ++ and $29, -2 * SZREG
1.59 ++
1.60 + #if _MIPS_SIM == _MIPS_SIM_ABI32
1.61 +- and $29, -2 * 4
1.62 +- subu $29, 32
1.63 +- la $7, _init /* init */
1.64 +- la $8, _fini
1.65 +- sw $8, 16($29) /* fini */
1.66 +- sw $2, 20($29) /* rtld_fini */
1.67 +- sw $29, 24($29) /* stack_end */
1.68 +-#else
1.69 +- and $29, -2 * PTRSIZE
1.70 ++ PTR_SUBIU $29, 32
1.71 ++#endif
1.72 + PTR_LA $7, _init /* init */
1.73 +- PTR_LA $8, _fini /* fini */
1.74 ++ PTR_LA $8, _fini
1.75 ++#if _MIPS_SIM == _MIPS_SIM_ABI32
1.76 ++ PTR_S $8, 16($29) /* fini */
1.77 ++ PTR_S $2, 20($29) /* rtld_fini */
1.78 ++ PTR_S $29, 24($29) /* stack_end */
1.79 ++#else
1.80 + move $9, $2 /* rtld_fini */
1.81 + move $10, $29 /* stack_end */
1.82 + #endif
1.83 +@@ -148,4 +129,3 @@ __data_start:
1.84 + .weak data_start
1.85 + data_start = __data_start
1.86 +
1.87 +-
1.88 +--
1.89 +1.6.6.1
1.90 +