Files
jsix_import/src/libraries/libc/arch/x86_64/crt0.s
Justin C. Miller 0e6b27e741 [kernel] Improve process init
Move process init from each process needing a main.s with _start to
crt0.s in libc. Also change to a sysv-like initial stack with a
j6-specific array of initialization values after the program arguments.
2020-12-31 00:57:51 -08:00

20 lines
210 B
ArmAsm

extern main
extern exit
extern _init_libc
global _start:function (_start.end - _start)
_start:
mov rbp, rsp
mov rdi, rsp
call _init_libc
pop rdi
mov rsi, rsp
call main
mov rdi, rax
call exit
.end: