From a614cfa25c42fbf0a2eab997ce07b830cc2c1884 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Tue, 14 Jul 2020 19:02:29 +0100 Subject: [PATCH] _start now uses mx_exit() to terminate --- CMakeLists.txt | 2 +- photon/libc/sys/magenta/machine/x86_64/crt0.s | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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