summaryrefslogtreecommitdiff
path: root/lib/libc/crt-src/amd64/crt0.S
diff options
context:
space:
mode:
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()