summaryrefslogtreecommitdiffstats
path: root/src/core/loader/linker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/loader/linker.cpp')
-rw-r--r--src/core/loader/linker.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/core/loader/linker.cpp b/src/core/loader/linker.cpp
index f82c6f4b4..87cc65e91 100644
--- a/src/core/loader/linker.cpp
+++ b/src/core/loader/linker.cpp
@@ -48,9 +48,9 @@ struct Elf64_Sym {
};
static_assert(sizeof(Elf64_Sym) == 0x18, "Elf64_Sym has incorrect size.");
-void Linker::WriteRelocations(std::vector<u8>& program_image,
- const std::vector<Symbol>& symbols, u64 relocation_offset,
- u64 size, bool is_jump_relocation, VAddr load_base) {
+void Linker::WriteRelocations(std::vector<u8>& program_image, const std::vector<Symbol>& symbols,
+ u64 relocation_offset, u64 size, bool is_jump_relocation,
+ VAddr load_base) {
for (u64 i = 0; i < size; i += sizeof(Elf64_Rela)) {
Elf64_Rela rela;
std::memcpy(&rela, &program_image[relocation_offset + i], sizeof(Elf64_Rela));
@@ -90,8 +90,7 @@ void Linker::WriteRelocations(std::vector<u8>& program_image,
}
}
-void Linker::Relocate(std::vector<u8>& program_image, u32 dynamic_section_offset,
- VAddr load_base) {
+void Linker::Relocate(std::vector<u8>& program_image, u32 dynamic_section_offset, VAddr load_base) {
std::map<u64, u64> dynamic;
while (dynamic_section_offset < program_image.size()) {
Elf64_Dyn dyn;
@@ -141,8 +140,7 @@ void Linker::ResolveImports() {
const auto& search = exports.find(import.first);
if (search != exports.end()) {
Memory::Write64(import.second.ea, search->second + import.second.addend);
- }
- else {
+ } else {
LOG_ERROR(Loader, "Unresolved import: %s", import.first.c_str());
}
}