diff options
author | MerryMage <MerryMage@users.noreply.github.com> | 2018-01-16 18:05:21 +0000 |
---|---|---|
committer | MerryMage <MerryMage@users.noreply.github.com> | 2018-01-16 18:05:21 +0000 |
commit | e35644c00533c797888a23420aae90b07e0da184 (patch) | |
tree | 4b5464207a2bf8355cd7b2b732fc3c30d3524d24 /src/core/loader/linker.cpp | |
parent | 153205edbba942447d1ac038d2599cab8ad598e8 (diff) |
clang-format
Diffstat (limited to 'src/core/loader/linker.cpp')
-rw-r--r-- | src/core/loader/linker.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/core/loader/linker.cpp b/src/core/loader/linker.cpp index f82c6f4b43..87cc65e917 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()); } } |