summaryrefslogtreecommitdiff
path: root/klibc/klibc/arch/m32r/crt0.S
diff options
context:
space:
mode:
Diffstat (limited to 'klibc/klibc/arch/m32r/crt0.S')
-rw-r--r--klibc/klibc/arch/m32r/crt0.S25
1 files changed, 25 insertions, 0 deletions
diff --git a/klibc/klibc/arch/m32r/crt0.S b/klibc/klibc/arch/m32r/crt0.S
new file mode 100644
index 0000000000..1589a774a2
--- /dev/null
+++ b/klibc/klibc/arch/m32r/crt0.S
@@ -0,0 +1,25 @@
+#
+# arch/m32r/crt0.S
+#
+# Does arch-specific initialization and invokes __libc_init
+# with the appropriate arguments.
+#
+# See __static_init.c or __shared_init.c for the expected
+# arguments.
+#
+
+ .text
+ .balign 4
+ .type _start,@function
+ .globl _start
+_start:
+ /* Save the address of the ELF argument array */
+ mv r0, sp
+
+ /* atexit() function (assume null) */
+ xor r1, r1
+
+ bl __libc_init
+
+ .size _start, .-_start
+