lib: c: rt: call task_exit once main() returns
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
.extern main
|
||||
.type main, @function
|
||||
|
||||
.extern task_exit
|
||||
.type task_exit, @function
|
||||
|
||||
_start:
|
||||
# Args (as provided by the ABI)
|
||||
# %rdi: int argc
|
||||
@@ -13,4 +16,7 @@ _start:
|
||||
# %rdx: kern_handle_t task
|
||||
# %rcx: kern_handle_t address_space
|
||||
call main
|
||||
|
||||
mov %rax, %rdi
|
||||
call task_exit
|
||||
1: jmp 1b
|
||||
|
||||
Reference in New Issue
Block a user