diff options
author | Nico Weber <thakis@chromium.org> | 2021-09-06 21:01:13 -0400 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-09-07 20:15:15 +0100 |
commit | 208aa05cf3b0d0fbc40efd2cb52befbf296ddb23 (patch) | |
tree | af08a72a69fac85c4655ceb958c5950d9bb859e2 /Kernel/Prekernel | |
parent | d0b0c45690c9314ddb353cf3ffd59ff92a9bbf7c (diff) | |
download | serenity-208aa05cf3b0d0fbc40efd2cb52befbf296ddb23.zip |
Kernel: Build UBSanitizer.cpp in aarch64 builds
All these symbols will be needed once we build MiniStdLib.cpp.
Diffstat (limited to 'Kernel/Prekernel')
-rw-r--r-- | Kernel/Prekernel/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Kernel/Prekernel/UBSanitizer.cpp | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/Kernel/Prekernel/CMakeLists.txt b/Kernel/Prekernel/CMakeLists.txt index d3bd1a7538..4c4f2a50e3 100644 --- a/Kernel/Prekernel/CMakeLists.txt +++ b/Kernel/Prekernel/CMakeLists.txt @@ -1,4 +1,5 @@ set(SOURCES + UBSanitizer.cpp ) if ("${SERENITY_ARCH}" STREQUAL "aarch64") set(SOURCES @@ -12,7 +13,6 @@ else() Arch/x86/boot.S Arch/x86/multiboot.S # FIXME: Eventually, some of these should build on aarch64 too. - UBSanitizer.cpp init.cpp ../MiniStdLib.cpp ../../Userland/Libraries/LibELF/Relocation.cpp diff --git a/Kernel/Prekernel/UBSanitizer.cpp b/Kernel/Prekernel/UBSanitizer.cpp index 02845523a4..0d258fe38b 100644 --- a/Kernel/Prekernel/UBSanitizer.cpp +++ b/Kernel/Prekernel/UBSanitizer.cpp @@ -15,7 +15,11 @@ extern "C" { static void print_location(const SourceLocation&) { +#if ARCH(I386) || ARCH(X86_64) asm volatile("cli; hlt"); +#else + for (;;) { } +#endif } void __ubsan_handle_load_invalid_value(const InvalidValueData&, ValueHandle) __attribute__((used)); |