1 From 9c343fd4030dcd7a52616f365893177dded50346 Mon Sep 17 00:00:00 2001
2 From: Khem Raj <raj.khem@gmail.com>
3 Date: Wed, 13 Jan 2010 01:51:32 +0000
4 Subject: mips/nptl: Pass correct parameters to dl_find_hash when resolving TLS relocations.
6 Make use of macros from sys/asm.h in crt1.S
7 These two changes are needed for mips nptl to boot once again.
9 Signed-off-by: Khem Raj <raj.khem@gmail.com>
11 diff --git a/libc/sysdeps/linux/mips/crt1.S b/libc/sysdeps/linux/mips/crt1.S
12 index e851d52..6a80412 100644
13 --- a/libc/sysdeps/linux/mips/crt1.S
14 +++ b/libc/sysdeps/linux/mips/crt1.S
19 -#if _MIPS_SIM == _MIPS_SIM_ABI32
22 - move $0, $31 /* Save old ra. */
23 - bal 10f /* Find addr of cpload. */
31 - move $0, $31; /* Save old ra. */
33 - bal 10f /* Find addr of .cpsetup. */
37 - .cpsetup $31, $25, 10b
43 - la $28, _gp /* Setup GP correctly if we're non-PIC. */
44 + PTR_LA $28, _gp /* Setup GP correctly if we're non-PIC. */
48 @@ -118,18 +99,18 @@ __start:
49 /* Allocate space on the stack for seven arguments and
50 * make sure the stack is aligned to double words (8 bytes) */
54 #if _MIPS_SIM == _MIPS_SIM_ABI32
57 - la $7, _init /* init */
59 - sw $8, 16($29) /* fini */
60 - sw $2, 20($29) /* rtld_fini */
61 - sw $29, 24($29) /* stack_end */
63 - and $29, -2 * PTRSIZE
66 PTR_LA $7, _init /* init */
67 - PTR_LA $8, _fini /* fini */
69 +#if _MIPS_SIM == _MIPS_SIM_ABI32
70 + PTR_S $8, 16($29) /* fini */
71 + PTR_S $2, 20($29) /* rtld_fini */
72 + PTR_S $29, 24($29) /* stack_end */
74 move $9, $2 /* rtld_fini */
75 move $10, $29 /* stack_end */
77 @@ -148,4 +129,3 @@ __data_start:
79 data_start = __data_start