diff options
Diffstat (limited to 'include/main_exit.s')
| -rw-r--r-- | include/main_exit.s | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/main_exit.s b/include/main_exit.s new file mode 100644 index 0000000..a38c5e5 --- /dev/null +++ b/include/main_exit.s @@ -0,0 +1,10 @@ +.ifndef _main_exit_s_file +_main_exit_s_file: + +# exitcode -> | cont (unused, should be 0) | +.thunkcode main_exit + mov 0x8(%rsi), %rdi # result to syscall exitcode + mov $0x3c, %rax # syscall 60 + syscall # exit %rdi + +.endif # _main_exit_s_file |
