]> git.proxmox.com Git - wasi-libc.git/blobdiff - libc-top-half/musl/arch/aarch64/crt_arch.h
WASI libc prototype implementation.
[wasi-libc.git] / libc-top-half / musl / arch / aarch64 / crt_arch.h
diff --git a/libc-top-half/musl/arch/aarch64/crt_arch.h b/libc-top-half/musl/arch/aarch64/crt_arch.h
new file mode 100644 (file)
index 0000000..b64fb3d
--- /dev/null
@@ -0,0 +1,15 @@
+__asm__(
+".text \n"
+".global " START "\n"
+".type " START ",%function\n"
+START ":\n"
+"      mov x29, #0\n"
+"      mov x30, #0\n"
+"      mov x0, sp\n"
+".weak _DYNAMIC\n"
+".hidden _DYNAMIC\n"
+"      adrp x1, _DYNAMIC\n"
+"      add x1, x1, #:lo12:_DYNAMIC\n"
+"      and sp, x0, #-16\n"
+"      b " START "_c\n"
+);