summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/nios2/crt1.S
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/nios2/crt1.S')
-rw-r--r--libc/sysdeps/linux/nios2/crt1.S4
1 files changed, 3 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/nios2/crt1.S b/libc/sysdeps/linux/nios2/crt1.S
index 948eeb1ed..bcb8a26db 100644
--- a/libc/sysdeps/linux/nios2/crt1.S
+++ b/libc/sysdeps/linux/nios2/crt1.S
@@ -47,7 +47,9 @@ _start:
movhi r7, %hi(_init)
ori r7, r7, %lo(_init)
- /* reuse the argc stack slot for the 5th arg */
+ /* Allocate space on the stack for 6-7th arg, reuse 5th space */
+ addi sp,sp,-8
+ /* push 5-7th args on stack */
movhi r8, %hi(_fini)
ori r8, r8, %lo(_fini)
stw r8, 0(sp)