aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/crt-src/amd64/crt0.S
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-03-14 22:01:56 -0400
committerIan Moffett <ian@osmora.org>2024-03-14 22:01:56 -0400
commit128684dfb24b710cc67bf3de293b31c25746db0c (patch)
tree8e2ba6e7ee86bab31f32265564cc33d2f6f35eba /lib/libc/crt-src/amd64/crt0.S
parent46af122de0533c2bf8344382757843f47686b33c (diff)
libc: Initial hyra libc commit
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'lib/libc/crt-src/amd64/crt0.S')
-rw-r--r--lib/libc/crt-src/amd64/crt0.S13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/libc/crt-src/amd64/crt0.S b/lib/libc/crt-src/amd64/crt0.S
new file mode 100644
index 0000000..d45d74c
--- /dev/null
+++ b/lib/libc/crt-src/amd64/crt0.S
@@ -0,0 +1,13 @@
+.text
+.globl _start
+
+_start:
+ xor %rbp, %rbp // End of callstack
+
+ pushq %rsi // argv
+ pushq %rdi // argc
+ call __libc_init
+
+ popq %rdi
+ popq %rsi
+ ud2 // TODO: Call exit()