Updated mx_process_kill() call in crt0

This commit is contained in:
Max Wash
2020-08-01 09:45:25 +01:00
parent 8959f1e0b3
commit 9f2828f06b
2 changed files with 5 additions and 4 deletions

View File

@@ -43,7 +43,7 @@ file(GLOB photon_libc_crt
${CMAKE_CURRENT_SOURCE_DIR}/photon/libc/sys/${platform}/machine/${machine}/crt*.s) ${CMAKE_CURRENT_SOURCE_DIR}/photon/libc/sys/${platform}/machine/${machine}/crt*.s)
add_library(crt OBJECT ${photon_libc_crt}) add_library(crt OBJECT ${photon_libc_crt})
target_compile_options(crt PRIVATE -c) target_compile_options(crt PRIVATE -c -ffreestanding -nostdlib)
file(GLOB platform_sources file(GLOB platform_sources
${CMAKE_CURRENT_SOURCE_DIR}/photon/libc/sys/${platform}/*.c ${CMAKE_CURRENT_SOURCE_DIR}/photon/libc/sys/${platform}/*.c

View File

@@ -11,7 +11,8 @@ _start:
mov %rsp, %rsi mov %rsp, %rsi
andq $-16, %rsp andq $-16, %rsp
call __crt_init call __crt_init
movq %rax, %rsi movq %rax, %rdx
movq $1, %rdi /* MX_EXIT_ALL_THREADS */ movq $1, %rsi /* MX_EXIT_ALL_THREADS */
movq $1, %rax /* mx_exit() */ movq $0, %rdi /* MX_NULL_HANDLE */
movq $23, %rax /* mx_process_kill() */
syscall syscall