summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/arch/arm/crt_arch.h
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/arch/arm/crt_arch.h')
-rw-r--r--libc-top-half/musl/arch/arm/crt_arch.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/libc-top-half/musl/arch/arm/crt_arch.h b/libc-top-half/musl/arch/arm/crt_arch.h
new file mode 100644
index 0000000..99508b1
--- /dev/null
+++ b/libc-top-half/musl/arch/arm/crt_arch.h
@@ -0,0 +1,18 @@
+__asm__(
+".text \n"
+".global " START " \n"
+".type " START ",%function \n"
+START ": \n"
+" mov fp, #0 \n"
+" mov lr, #0 \n"
+" ldr a2, 1f \n"
+" add a2, pc, a2 \n"
+" mov a1, sp \n"
+"2: and ip, a1, #-16 \n"
+" mov sp, ip \n"
+" bl " START "_c \n"
+".weak _DYNAMIC \n"
+".hidden _DYNAMIC \n"
+".align 2 \n"
+"1: .word _DYNAMIC-2b \n"
+);