diff options
author | bunnei <bunneidev@gmail.com> | 2018-07-24 04:07:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-24 04:07:22 +0200 |
commit | 1ce5e04be84ece12cb48e12cbb22456376e866df (patch) | |
tree | ad1c19030eef8373d186dacc23a39174206eaf6a | |
parent | Merge pull request #782 from lioncash/file (diff) | |
parent | linker: Remove unused parameter from WriteRelocations() (diff) | |
download | yuzu-1ce5e04be84ece12cb48e12cbb22456376e866df.tar yuzu-1ce5e04be84ece12cb48e12cbb22456376e866df.tar.gz yuzu-1ce5e04be84ece12cb48e12cbb22456376e866df.tar.bz2 yuzu-1ce5e04be84ece12cb48e12cbb22456376e866df.tar.lz yuzu-1ce5e04be84ece12cb48e12cbb22456376e866df.tar.xz yuzu-1ce5e04be84ece12cb48e12cbb22456376e866df.tar.zst yuzu-1ce5e04be84ece12cb48e12cbb22456376e866df.zip |
-rw-r--r-- | src/core/loader/linker.cpp | 8 | ||||
-rw-r--r-- | src/core/loader/linker.h | 3 |
2 files changed, 4 insertions, 7 deletions
diff --git a/src/core/loader/linker.cpp b/src/core/loader/linker.cpp index 769516b6f..57ca8c3ee 100644 --- a/src/core/loader/linker.cpp +++ b/src/core/loader/linker.cpp @@ -49,8 +49,7 @@ 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) { + u64 relocation_offset, u64 size, 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)); @@ -124,12 +123,11 @@ void Linker::Relocate(std::vector<u8>& program_image, u32 dynamic_section_offset } if (dynamic.find(DT_RELA) != dynamic.end()) { - WriteRelocations(program_image, symbols, dynamic[DT_RELA], dynamic[DT_RELASZ], false, - load_base); + WriteRelocations(program_image, symbols, dynamic[DT_RELA], dynamic[DT_RELASZ], load_base); } if (dynamic.find(DT_JMPREL) != dynamic.end()) { - WriteRelocations(program_image, symbols, dynamic[DT_JMPREL], dynamic[DT_PLTRELSZ], true, + WriteRelocations(program_image, symbols, dynamic[DT_JMPREL], dynamic[DT_PLTRELSZ], load_base); } } diff --git a/src/core/loader/linker.h b/src/core/loader/linker.h index c09d382c1..107625837 100644 --- a/src/core/loader/linker.h +++ b/src/core/loader/linker.h @@ -24,8 +24,7 @@ protected: }; void WriteRelocations(std::vector<u8>& program_image, const std::vector<Symbol>& symbols, - u64 relocation_offset, u64 size, bool is_jump_relocation, - VAddr load_base); + u64 relocation_offset, u64 size, VAddr load_base); void Relocate(std::vector<u8>& program_image, u32 dynamic_section_offset, VAddr load_base); void ResolveImports(); |