summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibSymbolication
diff options
context:
space:
mode:
authorGunnar Beutner <gbeutner@serenityos.org>2021-07-26 15:10:51 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-27 13:15:16 +0200
commit57417a3d6efe872d26cc790c5cc009dac3a3c8be (patch)
tree8ec61e9fcd76db03945c5b413276a920fc422087 /Userland/Libraries/LibSymbolication
parente3d2ca6bd20257bbb49a8da5e37b8e71dc697333 (diff)
downloadserenity-57417a3d6efe872d26cc790c5cc009dac3a3c8be.zip
Kernel: Support loading the kernel at almost arbitrary virtual addresses
This enables further work on implementing KASLR by adding relocation support to the pre-kernel and updating the kernel to be less dependent on specific virtual memory layouts.
Diffstat (limited to 'Userland/Libraries/LibSymbolication')
-rw-r--r--Userland/Libraries/LibSymbolication/Symbolication.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/Userland/Libraries/LibSymbolication/Symbolication.cpp b/Userland/Libraries/LibSymbolication/Symbolication.cpp
index 745b14fb0c..13bc9840d4 100644
--- a/Userland/Libraries/LibSymbolication/Symbolication.cpp
+++ b/Userland/Libraries/LibSymbolication/Symbolication.cpp
@@ -112,7 +112,6 @@ Vector<Symbol> symbolicate_thread(pid_t pid, pid_t tid)
FlatPtr base { 0 };
size_t size { 0 };
String path;
- bool is_relative { true };
};
Vector<FlatPtr> stack;
@@ -123,7 +122,6 @@ Vector<Symbol> symbolicate_thread(pid_t pid, pid_t tid)
.base = maybe_kernel_base.value(),
.size = 0x3fffffff,
.path = "/boot/Kernel.debug",
- .is_relative = false,
});
}
@@ -209,11 +207,7 @@ Vector<Symbol> symbolicate_thread(pid_t pid, pid_t tid)
continue;
}
- FlatPtr adjusted_address;
- if (found_region->is_relative)
- adjusted_address = address - found_region->base;
- else
- adjusted_address = address;
+ FlatPtr adjusted_address = address - found_region->base;
// We're subtracting 1 from the address because this is the return address,
// i.e. it is one instruction past the call instruction.