1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:17:44 +00:00

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
parent 58f6bf8a4d
commit 0319aa315a

View file

@ -18,3 +18,16 @@ extern "C" [[noreturn]] void init()
// FIXME: Share this with the Intel Prekernel. // FIXME: Share this with the Intel Prekernel.
extern size_t __stack_chk_guard; extern size_t __stack_chk_guard;
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();
}