Files
jsix/src/libraries/libc/arch/x86_64/crt0.s
Justin C. Miller 7fcb4efab6 [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.
2021-01-18 13:48:11 -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: