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:
parent
58f6bf8a4d
commit
0319aa315a
1 changed files with 13 additions and 0 deletions
|
@ -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();
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue