diff options
author | bunnei <bunneidev@gmail.com> | 2018-08-04 08:17:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-04 08:17:25 +0200 |
commit | 206f2e3436a2c1dddee7503edc4e142fb9a9dbd4 (patch) | |
tree | 69c99523b435fe2c2bff9b022534035a9b4b4020 /src/core/loader | |
parent | Merge pull request #917 from lioncash/crash (diff) | |
parent | kernel/process: Use std::array where applicable (diff) | |
download | yuzu-206f2e3436a2c1dddee7503edc4e142fb9a9dbd4.tar yuzu-206f2e3436a2c1dddee7503edc4e142fb9a9dbd4.tar.gz yuzu-206f2e3436a2c1dddee7503edc4e142fb9a9dbd4.tar.bz2 yuzu-206f2e3436a2c1dddee7503edc4e142fb9a9dbd4.tar.lz yuzu-206f2e3436a2c1dddee7503edc4e142fb9a9dbd4.tar.xz yuzu-206f2e3436a2c1dddee7503edc4e142fb9a9dbd4.tar.zst yuzu-206f2e3436a2c1dddee7503edc4e142fb9a9dbd4.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/loader/elf.cpp | 6 | ||||
-rw-r--r-- | src/core/loader/nro.cpp | 2 | ||||
-rw-r--r-- | src/core/loader/nso.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/core/loader/elf.cpp b/src/core/loader/elf.cpp index 352938dcb..a7133f5a6 100644 --- a/src/core/loader/elf.cpp +++ b/src/core/loader/elf.cpp @@ -311,11 +311,11 @@ SharedPtr<CodeSet> ElfReader::LoadInto(u32 vaddr) { CodeSet::Segment* codeset_segment; u32 permission_flags = p->p_flags & (PF_R | PF_W | PF_X); if (permission_flags == (PF_R | PF_X)) { - codeset_segment = &codeset->code; + codeset_segment = &codeset->CodeSegment(); } else if (permission_flags == (PF_R)) { - codeset_segment = &codeset->rodata; + codeset_segment = &codeset->RODataSegment(); } else if (permission_flags == (PF_R | PF_W)) { - codeset_segment = &codeset->data; + codeset_segment = &codeset->DataSegment(); } else { LOG_ERROR(Loader, "Unexpected ELF PT_LOAD segment id {} with flags {:X}", i, p->p_flags); diff --git a/src/core/loader/nro.cpp b/src/core/loader/nro.cpp index 7d3ec2a76..dc053cdad 100644 --- a/src/core/loader/nro.cpp +++ b/src/core/loader/nro.cpp @@ -159,7 +159,7 @@ bool AppLoader_NRO::LoadNro(FileSys::VirtualFile file, VAddr load_base) { // Resize program image to include .bss section and page align each section bss_size = PageAlignSize(mod_header.bss_end_offset - mod_header.bss_start_offset); } - codeset->data.size += bss_size; + codeset->DataSegment().size += bss_size; program_image.resize(static_cast<u32>(program_image.size()) + bss_size); // Load codeset for current process diff --git a/src/core/loader/nso.cpp b/src/core/loader/nso.cpp index 06b1b33f4..fee7d58c6 100644 --- a/src/core/loader/nso.cpp +++ b/src/core/loader/nso.cpp @@ -127,7 +127,7 @@ VAddr AppLoader_NSO::LoadModule(FileSys::VirtualFile file, VAddr load_base) { // Resize program image to include .bss section and page align each section bss_size = PageAlignSize(mod_header.bss_end_offset - mod_header.bss_start_offset); } - codeset->data.size += bss_size; + codeset->DataSegment().size += bss_size; const u32 image_size{PageAlignSize(static_cast<u32>(program_image.size()) + bss_size)}; program_image.resize(image_size); |