summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/sh/crt0.S
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-08-08 14:51:40 +0000
committerEric Andersen <andersen@codepoet.org>2002-08-08 14:51:40 +0000
commit9f2d19bf1ef216e536c5e89b82a5ce422002fd01 (patch)
tree1103cecba0916b5c2b42f3ff7f1d6fa12b115b49 /libc/sysdeps/linux/sh/crt0.S
parent42650258c1d93e49e102dcbb02ca75de53a0b7b8 (diff)
I reworked syscalls.h to match how I'm doing other arches. Stefan Allius and
Edie C. Dost has some concerns about the perl script used to general crti.o and crtn.o and added their own versions. These versions will win since they are built last,
Diffstat (limited to 'libc/sysdeps/linux/sh/crt0.S')
-rw-r--r--libc/sysdeps/linux/sh/crt0.S39
1 files changed, 14 insertions, 25 deletions
diff --git a/libc/sysdeps/linux/sh/crt0.S b/libc/sysdeps/linux/sh/crt0.S
index 149fd21cd..d7b54299f 100644
--- a/libc/sysdeps/linux/sh/crt0.S
+++ b/libc/sysdeps/linux/sh/crt0.S
@@ -42,49 +42,38 @@
...
NULL
*/
-
.text
.globl _start
-
+ .type _start,@function
+ .size _start,_start_end - _start
_start:
- /* Clear the frame pointer since this is the outermost frame. */
+ /* Clear the frame pointer since this is the outermost frame. (in delay slot) */
mov #0, r14
/* Pop argc off the stack and save a pointer to argv */
mov.l @r15+,r4
mov r15, r5
- /* set up the value for the environment pointer
- r6 = (argc+1)*4+argv
- */
+ /*
+ * Setup the value for the environment pointer:
+ * r6 = (argc + 1) * 4
+ * r6 += argv (in delay slot)
+ */
mov r4,r6
add #1,r6
shll2 r6
- add r5,r6
-
- ! Clear BSS area
- mov.l 3f, r1
- add #4, r1
- mov.l 4f, r2
- mov #0, r0
-9: cmp/hs r2, r1
- bf/s 9b ! while (r1 < r2)
- mov.l r0,@-r2
/* call main */
- mov.l L_main,r1
- jsr @r1
- nop
+ mov.l L_main, r0
+ jsr @r0
- /* should never get here....*/
- mov.l L_abort,r1
- jsr @r1
+ /* We should not get here. */
+ mov.l L_abort, r0
+ jsr @r0
nop
-
+_start_end:
.align 2
-3: .long __bss_start
-4: .long _end
L_main:
.long __uClibc_main