LibC: Set up a dummy first stack frame in _start

This ensures that we stop walking the stack at `_entry` and don't
crash/panic when computing backtraces.
This commit is contained in:
Daniel Bertalan 2023-05-30 15:22:59 +02:00 committed by Andreas Kling
commit fb11645a9b
Notes: sideshowbarker 2024-07-17 07:14:09 +09:00

View file

@ -27,6 +27,8 @@ NAKED void _start(int, char**, char**)
{ {
# if ARCH(AARCH64) # if ARCH(AARCH64)
asm( asm(
"mov x29, 0\n"
"mov x30, 0\n"
"bl _entry\n"); "bl _entry\n");
# else # else
asm( asm(