diff options
author | GPUCode <geoster3d@gmail.com> | 2023-11-19 10:21:53 +0100 |
---|---|---|
committer | t895 <clombardo169@gmail.com> | 2023-11-25 06:47:35 +0100 |
commit | 6de2edcca1624982e99a72741d4fa289dc9d7551 (patch) | |
tree | 8c355b39a6f71e333ccc2f929816ce96e40d3f2c /src/core/loader/nso.cpp | |
parent | android: Add cpu bakend gui toggle (diff) | |
download | yuzu-6de2edcca1624982e99a72741d4fa289dc9d7551.tar yuzu-6de2edcca1624982e99a72741d4fa289dc9d7551.tar.gz yuzu-6de2edcca1624982e99a72741d4fa289dc9d7551.tar.bz2 yuzu-6de2edcca1624982e99a72741d4fa289dc9d7551.tar.lz yuzu-6de2edcca1624982e99a72741d4fa289dc9d7551.tar.xz yuzu-6de2edcca1624982e99a72741d4fa289dc9d7551.tar.zst yuzu-6de2edcca1624982e99a72741d4fa289dc9d7551.zip |
Diffstat (limited to 'src/core/loader/nso.cpp')
-rw-r--r-- | src/core/loader/nso.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/core/loader/nso.cpp b/src/core/loader/nso.cpp index 34b10ef2e..1ad2e917c 100644 --- a/src/core/loader/nso.cpp +++ b/src/core/loader/nso.cpp @@ -94,8 +94,8 @@ std::optional<VAddr> AppLoader_NSO::LoadModule(Kernel::KProcess& process, Core:: // Allocate some space at the beginning if we are patching in PreText mode. const size_t module_start = [&]() -> size_t { #ifdef ARCHITECTURE_arm64 - if (patch && patch->Mode() == Core::NCE::PatchMode::PreText) { - return patch->SectionSize(); + if (patch && patch->GetPatchMode() == Core::NCE::PatchMode::PreText) { + return patch->GetSectionSize(); } #endif return 0; @@ -158,24 +158,25 @@ std::optional<VAddr> AppLoader_NSO::LoadModule(Kernel::KProcess& process, Core:: #ifdef ARCHITECTURE_arm64 // If we are computing the process code layout and using nce backend, patch. const auto& code = codeset.CodeSegment(); - if (patch && patch->Mode() == Core::NCE::PatchMode::None) { + if (patch && patch->GetPatchMode() == Core::NCE::PatchMode::None) { // Patch SVCs and MRS calls in the guest code patch->PatchText(program_image, code); // Add patch section size to the module size. - image_size += patch->SectionSize(); + image_size += patch->GetSectionSize(); } else if (patch) { // Relocate code patch and copy to the program_image. patch->RelocateAndCopy(load_base, code, program_image, &process.GetPostHandlers()); // Update patch section. auto& patch_segment = codeset.PatchSegment(); - patch_segment.addr = patch->Mode() == Core::NCE::PatchMode::PreText ? 0 : image_size; - patch_segment.size = static_cast<u32>(patch->SectionSize()); + patch_segment.addr = + patch->GetPatchMode() == Core::NCE::PatchMode::PreText ? 0 : image_size; + patch_segment.size = static_cast<u32>(patch->GetSectionSize()); // Add patch section size to the module size. In PreText mode image_size // already contains the patch segment as part of module_start. - if (patch->Mode() == Core::NCE::PatchMode::PostData) { + if (patch->GetPatchMode() == Core::NCE::PatchMode::PostData) { image_size += patch_segment.size; } } |