diff options
Diffstat (limited to 'src/_sys.x86-64.s')
| -rw-r--r-- | src/_sys.x86-64.s | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/_sys.x86-64.s b/src/_sys.x86-64.s new file mode 100644 index 00000000..415a8084 --- /dev/null +++ b/src/_sys.x86-64.s @@ -0,0 +1,21 @@ +.global __syscall +__syscall: + mov %rdi, %rax + mov %rsi, %rdi + mov %rdx, %rsi + mov %rcx, %rdx + mov %r8, %r10 + mov %r9, %r8 + mov 8(%rsp), %r9 + syscall + ret + +.global _start +_start: + popq %rdi + movq %rsp, %rsi + call __main + +.global __stack_chk_fail +__stack_chk_fail: + ret |
