summaryrefslogtreecommitdiffstats
path: root/src/core/loader/linker.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-07-23 23:39:21 +0200
committerLioncash <mathew1800@gmail.com>2018-07-23 23:40:12 +0200
commit184c516182c6855f03ec9aec3f3d5e2cae0686cf (patch)
treef693b87093f3fdc149bb2d4230d42ebf1cd106dd /src/core/loader/linker.cpp
parentMerge pull request #695 from DarkLordZach/nro-asset (diff)
downloadyuzu-184c516182c6855f03ec9aec3f3d5e2cae0686cf.tar
yuzu-184c516182c6855f03ec9aec3f3d5e2cae0686cf.tar.gz
yuzu-184c516182c6855f03ec9aec3f3d5e2cae0686cf.tar.bz2
yuzu-184c516182c6855f03ec9aec3f3d5e2cae0686cf.tar.lz
yuzu-184c516182c6855f03ec9aec3f3d5e2cae0686cf.tar.xz
yuzu-184c516182c6855f03ec9aec3f3d5e2cae0686cf.tar.zst
yuzu-184c516182c6855f03ec9aec3f3d5e2cae0686cf.zip
Diffstat (limited to 'src/core/loader/linker.cpp')
-rw-r--r--src/core/loader/linker.cpp8
1 files changed, 3 insertions, 5 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);
}
}