summaryrefslogtreecommitdiff
path: root/Tests
diff options
context:
space:
mode:
authorGunnar Beutner <gbeutner@serenityos.org>2022-10-12 22:18:24 +0200
committerLinus Groh <mail@linusgroh.de>2022-10-14 13:01:13 +0200
commit808c43312da7dd89cd503becda33cb060d05051e (patch)
tree5547fbaace5496b44f752095b2f999294ba9706d /Tests
parentdadf656dc984c1af7b720d6fdcf6a2f095a4ed09 (diff)
downloadserenity-808c43312da7dd89cd503becda33cb060d05051e.zip
Tests+Userland: Implement AARCH64 support for some inline assembly blobs
Diffstat (limited to 'Tests')
-rw-r--r--Tests/Kernel/elf-symbolication-kernel-read-exploit.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/Kernel/elf-symbolication-kernel-read-exploit.cpp b/Tests/Kernel/elf-symbolication-kernel-read-exploit.cpp
index 88ac29fa74..9f1a720f3d 100644
--- a/Tests/Kernel/elf-symbolication-kernel-read-exploit.cpp
+++ b/Tests/Kernel/elf-symbolication-kernel-read-exploit.cpp
@@ -11,9 +11,17 @@
#include <string.h>
#include <unistd.h>
+#if ARCH(I386) || ARCH(X86_64)
asm("haxcode:\n"
"1: jmp 1b\n"
"haxcode_end:\n");
+#elif ARCH(AARCH64)
+asm("haxcode:\n"
+ "1: b 1b\n"
+ "haxcode_end:\n");
+#else
+# error Unknown architecture
+#endif
extern "C" void haxcode();
extern "C" void haxcode_end();