Call exit syscall on program exit
This commit is contained in:
parent
692725dc96
commit
e1b61560c9
1 changed files with 9 additions and 0 deletions
|
@ -25,6 +25,15 @@ global_asm!(
|
|||
_start:
|
||||
mov $stack, %rsp
|
||||
call main
|
||||
mov $1, %rdi
|
||||
mov %rax, %rsi
|
||||
call _syscall
|
||||
|
||||
.global _syscall
|
||||
_syscall:
|
||||
mov %rcx, %r10
|
||||
syscall
|
||||
ret
|
||||
|
||||
.section .bss
|
||||
.align 16
|
||||
|
|
Loading…
Add table
Reference in a new issue