diff --git a/CMakeLists.txt b/CMakeLists.txt index 63db8cc..2b8b274 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -99,7 +99,7 @@ add_custom_target(local-root ${CMAKE_CURRENT_BINARY_DIR} ${platform} ${machine}) -framework_add_dependencies(Photon local-root) +framework_add_dependencies(Photon local-root crt) add_custom_command(TARGET Photon POST_BUILD COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/add-framework-crt.sh diff --git a/photon/libc/sys/magenta/machine/x86_64/crt0.s b/photon/libc/sys/magenta/machine/x86_64/crt0.s index d656a2a..4261e9a 100644 --- a/photon/libc/sys/magenta/machine/x86_64/crt0.s +++ b/photon/libc/sys/magenta/machine/x86_64/crt0.s @@ -8,10 +8,10 @@ .type main, @function _start: - pop %rdi mov %rsp, %rsi andq $-16, %rsp call __crt_init movq %rax, %rdi - movq $60, %rax + movq $2, %rsi + movq $1, %rax syscall