From 714e7433930e68698b1e33c1de13dc5514cd5a77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 24 Jul 2024 17:34:44 +0200 Subject: [PATCH] start: Align the stack on aarch64 just in case. The kernel does this as required, but we cannot trust dynamic linkers to do it. --- lib/std/start.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/std/start.zig b/lib/std/start.zig index 4c3329a01c..35485a6995 100644 --- a/lib/std/start.zig +++ b/lib/std/start.zig @@ -297,6 +297,7 @@ fn _start() callconv(.Naked) noreturn { \\ mov fp, #0 \\ mov lr, #0 \\ mov x0, sp + \\ and sp, x0, #-16 \\ b %[posixCallMainAndExit] , .arm, .armeb, .thumb, .thumbeb =>