Kernel - General fixing after ARM7 changes
[tpg/acess2.git] / Usermode / Libraries / crt0.o_src / crt0.asm
index b923d18..531a378 100644 (file)
@@ -15,5 +15,16 @@ _start:
 start:
        call main
        push eax
-       call _exit      
+
+       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

UCC git Repository :: git.ucc.asn.au