diff --git a/service/urt/arch/amd64/crt/crti.S b/service/urt/arch/amd64/crt/crti.S index ef78700..a1cdb91 100644 --- a/service/urt/arch/amd64/crt/crti.S +++ b/service/urt/arch/amd64/crt/crti.S @@ -6,10 +6,16 @@ * Author: Chloe M. */ +#include + .text .globl _start _start: xor %rbp, %rbp /* Terminate callstack */ call Main /* Enter program main */ -1: pause - jmp 1b + + push %rax /* Push the status code */ + mov $SYS_EXIT, %rax /* Prepare the exit */ + pop %rdi /* Pop the status code */ + int $0x2E /* To the reaper queue we go */ + ud2