X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FLibraries%2Fcrt0.o_src%2Fcrt0.asm;h=531a3783ef31fe5404eaadb5452ba8c70cff2573;hb=c43c05ef3234d6118ce601d299df60383d54ac7b;hp=b8f52703688dc10858ed719ae2257cdddf71a508;hpb=270e5fe88b0666021a7a6393334db7feeb8245f8;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/crt0.o_src/crt0.asm b/Usermode/Libraries/crt0.o_src/crt0.asm index b8f52703..531a3783 100644 --- a/Usermode/Libraries/crt0.o_src/crt0.asm +++ b/Usermode/Libraries/crt0.o_src/crt0.asm @@ -15,5 +15,16 @@ _start: start: call main push eax + + mov eax, [_crt0_exit_handler] + test eax, eax + jz .exit + call eax + +.exit: call _exit jmp $ ; This should never be reached +[section .bss] +[global _crt0_exit_handler] +_crt0_exit_handler: + resd 1