Kernel: Add __stack_chk_fail to aarch64 Prekernel init

This is needed for some functions with local variables. We'll grow
such a function soon.
This commit is contained in:
Nico Weber 2021-09-17 10:44:28 -04:00 committed by Linus Groh
commit 0319aa315a
Notes: sideshowbarker 2024-07-18 03:40:37 +09:00

View file

@ -18,3 +18,16 @@ extern "C" [[noreturn]] void init()
// FIXME: Share this with the Intel Prekernel.
extern size_t __stack_chk_guard;
size_t __stack_chk_guard;
extern "C" [[noreturn]] void __stack_chk_fail();
[[noreturn]] static void halt()
{
for (;;) {
asm volatile("wfi");
}
}
void __stack_chk_fail()
{
halt();
}