From 557c98917cf0c44a7921a19321f6ec261c925861 Mon Sep 17 00:00:00 2001 From: Pascal Zittlau Date: Wed, 10 Dec 2025 11:40:24 +0100 Subject: [PATCH] support lto --- src/syscalls.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/syscalls.zig b/src/syscalls.zig index 20f6de7..006c1f6 100644 --- a/src/syscalls.zig +++ b/src/syscalls.zig @@ -109,5 +109,9 @@ pub fn syscall_entry() callconv(.naked) void { \\ # Restore Red Zone and Return \\ add $128, %rsp \\ ret + : + // TODO: can we somehow use %[handler] in the assembly instead? + // Right now this is just here such that lto does not discard the `syscall_handler` function + : [handler] "i" (syscall_handler), ); }