patches/uClibc/0.9.30.2/160-Make-use-of-macros-from-sys-asm.h-in-crt1.S.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Aug 02 18:28:10 2011 +0200 (2011-08-02)
changeset 2590 b64cfb67944e
permissions -rw-r--r--
scripts/functions: svn retrieval first tries the mirror for tarballs

The svn download helper looks for the local tarballs dir to see if it
can find a pre-downloaded tarball, and if it does not find it, does
the actual fetch to upstream via svn.

In the process, it does not even try to get a tarball from the local
mirror, which can be useful if the mirror has been pre-populated
manually (or with a previously downloaded tree).

Fake a tarball get with the standard tarball-download helper, but
without specifying any upstream URL, which makes the helper directly
try the LAN mirror.

Of course, if no mirror is specified, no URL wil be available, and
the standard svn retrieval will kick in.

Reported-by: ANDY KENNEDY <ANDY.KENNEDY@adtran.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
yann@1819
     1
From 2911103dd4a03bbd3aad11eddfce524a5c9ba9b3 Mon Sep 17 00:00:00 2001
yann@1819
     2
From: Khem Raj <raj.khem@gmail.com>
yann@1819
     3
Date: Fri, 22 Jan 2010 13:00:20 +0100
yann@1819
     4
Subject: [PATCH 03/15] Make use of macros from sys/asm.h in crt1.S
yann@1819
     5
yann@1819
     6
Needed for mips nptl to boot once again.
yann@1819
     7
(cherry picked from commit 9c343fd4030dcd7a52616f365893177dded50346)
yann@1819
     8
yann@1819
     9
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
yann@1819
    10
---
yann@1819
    11
 libc/sysdeps/linux/mips/crt1.S |   46 +++++++++++----------------------------
yann@1819
    12
 1 files changed, 13 insertions(+), 33 deletions(-)
yann@1819
    13
yann@1819
    14
diff --git a/libc/sysdeps/linux/mips/crt1.S b/libc/sysdeps/linux/mips/crt1.S
yann@1819
    15
index e851d52..6a80412 100644
yann@1819
    16
--- a/libc/sysdeps/linux/mips/crt1.S
yann@1819
    17
+++ b/libc/sysdeps/linux/mips/crt1.S
yann@1819
    18
@@ -85,29 +85,10 @@
yann@1819
    19
 
yann@1819
    20
 __start:
yann@1819
    21
 #ifdef __PIC__
yann@1819
    22
-#if _MIPS_SIM == _MIPS_SIM_ABI32
yann@1819
    23
-	.frame	sp, 24, sp
yann@1819
    24
-        .set noreorder
yann@1819
    25
-	move $0, $31		/* Save old ra.  */
yann@1819
    26
-	bal 10f			/* Find addr of cpload.  */
yann@1819
    27
-        nop
yann@1819
    28
-10:
yann@1819
    29
-	.cpload $31
yann@1819
    30
-	move $31, $0
yann@1819
    31
-	.set reorder
yann@1819
    32
-	.cprestore 16
yann@1819
    33
-#else
yann@1819
    34
-	move $0, $31; /* Save old ra.  */
yann@1819
    35
-	.set noreorder
yann@1819
    36
-	bal 10f /* Find addr of .cpsetup.  */
yann@1819
    37
-	nop
yann@1819
    38
-10:
yann@1819
    39
-	.set reorder
yann@1819
    40
-	.cpsetup $31, $25, 10b
yann@1819
    41
-	move $31, $0
yann@1819
    42
-#endif
yann@1819
    43
+	SETUP_GPX($0)
yann@1819
    44
+	SETUP_GPX64($25,$0)
yann@1819
    45
 #else
yann@1819
    46
-	la $28, _gp             /* Setup GP correctly if we're non-PIC.  */
yann@1819
    47
+	PTR_LA $28, _gp             /* Setup GP correctly if we're non-PIC.  */
yann@1819
    48
 	move $31, $0
yann@1819
    49
 #endif
yann@1819
    50
 
yann@1819
    51
@@ -118,18 +99,18 @@ __start:
yann@1819
    52
 	/* Allocate space on the stack for seven arguments and
yann@1819
    53
 	 * make sure the stack is aligned to double words (8 bytes) */
yann@1819
    54
 
yann@1819
    55
+	and $29, -2 * SZREG
yann@1819
    56
+
yann@1819
    57
 #if _MIPS_SIM == _MIPS_SIM_ABI32
yann@1819
    58
-	and $29, -2 * 4
yann@1819
    59
-	subu $29, 32
yann@1819
    60
-	la $7, _init		/* init */
yann@1819
    61
-	la $8, _fini
yann@1819
    62
-	sw $8, 16($29)		/* fini */
yann@1819
    63
-	sw $2, 20($29)		/* rtld_fini */
yann@1819
    64
-	sw $29, 24($29)		/* stack_end */
yann@1819
    65
-#else
yann@1819
    66
-	and $29, -2 * PTRSIZE
yann@1819
    67
+	PTR_SUBIU $29, 32
yann@1819
    68
+#endif
yann@1819
    69
 	PTR_LA $7, _init		/* init */
yann@1819
    70
-	PTR_LA $8, _fini		/* fini */
yann@1819
    71
+	PTR_LA $8, _fini
yann@1819
    72
+#if _MIPS_SIM == _MIPS_SIM_ABI32
yann@1819
    73
+	PTR_S $8, 16($29)		/* fini */
yann@1819
    74
+	PTR_S $2, 20($29)		/* rtld_fini */
yann@1819
    75
+	PTR_S $29, 24($29)		/* stack_end */
yann@1819
    76
+#else
yann@1819
    77
 	move $9, $2		/* rtld_fini */
yann@1819
    78
 	move $10, $29		/* stack_end */
yann@1819
    79
 #endif
yann@1819
    80
@@ -148,4 +129,3 @@ __data_start:
yann@1819
    81
 	.weak data_start
yann@1819
    82
 	data_start = __data_start
yann@1819
    83
 
yann@1819
    84
-
yann@1819
    85
-- 
yann@1819
    86
1.6.6.1
yann@1819
    87