Squash commits for public release
This commit is contained in:
27
libs/libc/sysdeps/unix/x86_64/crt0.S
Normal file
27
libs/libc/sysdeps/unix/x86_64/crt0.S
Normal file
@@ -0,0 +1,27 @@
|
||||
[bits 64]
|
||||
|
||||
section .text
|
||||
|
||||
extern main
|
||||
extern exit
|
||||
extern _init
|
||||
extern _deinit
|
||||
|
||||
global _start:function (_start.end - _start)
|
||||
_start:
|
||||
push rsi
|
||||
push rdi
|
||||
push rdx
|
||||
push rcx
|
||||
call _init
|
||||
pop rcx
|
||||
pop rdx
|
||||
pop rdi
|
||||
pop rsi
|
||||
call main
|
||||
push rax
|
||||
call _deinit
|
||||
pop rax
|
||||
mov rdi, rax
|
||||
call exit
|
||||
.end:
|
||||
Reference in New Issue
Block a user