Kernel - General fixing after ARM7 changes
[tpg/acess2.git] / Usermode / Libraries / crt0.o_src / crt0.x86_64.asm
1 ;
2 ; Acess2
3 ; C Runtime 0
4 ; - crt0.asm
5
6 [BITS 64]
7 [section .text]
8
9
10 [global _start]
11 [global start]
12 [extern main]
13 [extern _exit]
14 _start:
15 start:
16         call main
17         push rax
18
19         mov rax, [_crt0_exit_handler]
20         test rax, rax
21         jz .exit
22         call rax
23
24 .exit:
25         call _exit
26         jmp $   ; This should never be reached
27
28 [section .bss]
29 [global _crt0_exit_handler]
30 _crt0_exit_handler:
31         resq    1

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