summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/mips/crt1.S
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/mips/crt1.S')
-rw-r--r--libc/sysdeps/linux/mips/crt1.S5
1 files changed, 4 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/mips/crt1.S b/libc/sysdeps/linux/mips/crt1.S
index 2e38cf07c..e851d52d2 100644
--- a/libc/sysdeps/linux/mips/crt1.S
+++ b/libc/sysdeps/linux/mips/crt1.S
@@ -81,10 +81,12 @@
#endif
.type main,@function
.type __uClibc_main,@function
+ .ent __start
__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. */
@@ -93,6 +95,7 @@ __start:
.cpload $31
move $31, $0
.set reorder
+ .cprestore 16
#else
move $0, $31; /* Save old ra. */
.set noreorder
@@ -108,7 +111,6 @@ __start:
move $31, $0
#endif
-
PTR_LA $4, main /* main */
PTR_L $5, 0($29) /* argc */
PTR_ADDIU $6, $29, PTRSIZE /* argv */
@@ -136,6 +138,7 @@ hlt:
/* Crash if somehow `__uClibc_main' returns anyway. */
b hlt
.size __start,.-__start
+.end __start
/* Define a symbol for the first piece of initialized data. */
.data