Commit 714e743393

Alex Rønne Petersen <alex@alexrp.com>
2024-07-24 17:34:44
start: Align the stack on aarch64 just in case.
The kernel does this as required, but we cannot trust dynamic linkers to do it.
1 parent 9771390
Changed files (1)
lib
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 =>