diff options
Diffstat (limited to 'src/core/loader')
| -rw-r--r-- | src/core/loader/deconstructed_rom_directory.cpp | 6 | ||||
| -rw-r--r-- | src/core/loader/nro.cpp | 6 | ||||
| -rw-r--r-- | src/core/loader/nso.cpp | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/core/loader/deconstructed_rom_directory.cpp b/src/core/loader/deconstructed_rom_directory.cpp index 31c00f0a3..a1344f1c4 100644 --- a/src/core/loader/deconstructed_rom_directory.cpp +++ b/src/core/loader/deconstructed_rom_directory.cpp | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | #include "core/loader/deconstructed_rom_directory.h" | 15 | #include "core/loader/deconstructed_rom_directory.h" |
| 16 | #include "core/loader/nso.h" | 16 | #include "core/loader/nso.h" |
| 17 | 17 | ||
| 18 | #ifdef ARCHITECTURE_arm64 | 18 | #ifdef HAS_NCE |
| 19 | #include "core/arm/nce/patch.h" | 19 | #include "core/arm/nce/patch.h" |
| 20 | #endif | 20 | #endif |
| 21 | 21 | ||
| @@ -141,12 +141,12 @@ AppLoader_DeconstructedRomDirectory::LoadResult AppLoader_DeconstructedRomDirect | |||
| 141 | std::size_t code_size{}; | 141 | std::size_t code_size{}; |
| 142 | 142 | ||
| 143 | // Define an nce patch context for each potential module. | 143 | // Define an nce patch context for each potential module. |
| 144 | #ifdef ARCHITECTURE_arm64 | 144 | #ifdef HAS_NCE |
| 145 | std::array<Core::NCE::Patcher, 13> module_patchers; | 145 | std::array<Core::NCE::Patcher, 13> module_patchers; |
| 146 | #endif | 146 | #endif |
| 147 | 147 | ||
| 148 | const auto GetPatcher = [&](size_t i) -> Core::NCE::Patcher* { | 148 | const auto GetPatcher = [&](size_t i) -> Core::NCE::Patcher* { |
| 149 | #ifdef ARCHITECTURE_arm64 | 149 | #ifdef HAS_NCE |
| 150 | if (Settings::IsNceEnabled()) { | 150 | if (Settings::IsNceEnabled()) { |
| 151 | return &module_patchers[i]; | 151 | return &module_patchers[i]; |
| 152 | } | 152 | } |
diff --git a/src/core/loader/nro.cpp b/src/core/loader/nro.cpp index 49d4d7e43..2e7368349 100644 --- a/src/core/loader/nro.cpp +++ b/src/core/loader/nro.cpp | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | #include "core/loader/nso.h" | 22 | #include "core/loader/nso.h" |
| 23 | #include "core/memory.h" | 23 | #include "core/memory.h" |
| 24 | 24 | ||
| 25 | #ifdef ARCHITECTURE_arm64 | 25 | #ifdef HAS_NCE |
| 26 | #include "core/arm/nce/patch.h" | 26 | #include "core/arm/nce/patch.h" |
| 27 | #endif | 27 | #endif |
| 28 | 28 | ||
| @@ -201,7 +201,7 @@ static bool LoadNroImpl(Core::System& system, Kernel::KProcess& process, | |||
| 201 | program_image.resize(static_cast<u32>(program_image.size()) + bss_size); | 201 | program_image.resize(static_cast<u32>(program_image.size()) + bss_size); |
| 202 | size_t image_size = program_image.size(); | 202 | size_t image_size = program_image.size(); |
| 203 | 203 | ||
| 204 | #ifdef ARCHITECTURE_arm64 | 204 | #ifdef HAS_NCE |
| 205 | const auto& code = codeset.CodeSegment(); | 205 | const auto& code = codeset.CodeSegment(); |
| 206 | 206 | ||
| 207 | // NROs always have a 39-bit address space. | 207 | // NROs always have a 39-bit address space. |
| @@ -247,7 +247,7 @@ static bool LoadNroImpl(Core::System& system, Kernel::KProcess& process, | |||
| 247 | 247 | ||
| 248 | // Relocate code patch and copy to the program_image if running under NCE. | 248 | // Relocate code patch and copy to the program_image if running under NCE. |
| 249 | // This needs to be after LoadFromMetadata so we can use the process entry point. | 249 | // This needs to be after LoadFromMetadata so we can use the process entry point. |
| 250 | #ifdef ARCHITECTURE_arm64 | 250 | #ifdef HAS_NCE |
| 251 | if (Settings::IsNceEnabled()) { | 251 | if (Settings::IsNceEnabled()) { |
| 252 | patch.RelocateAndCopy(process.GetEntryPoint(), code, program_image, | 252 | patch.RelocateAndCopy(process.GetEntryPoint(), code, program_image, |
| 253 | &process.GetPostHandlers()); | 253 | &process.GetPostHandlers()); |
diff --git a/src/core/loader/nso.cpp b/src/core/loader/nso.cpp index 1ad2e917c..878c1c6cb 100644 --- a/src/core/loader/nso.cpp +++ b/src/core/loader/nso.cpp | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | #include "core/loader/nso.h" | 20 | #include "core/loader/nso.h" |
| 21 | #include "core/memory.h" | 21 | #include "core/memory.h" |
| 22 | 22 | ||
| 23 | #ifdef ARCHITECTURE_arm64 | 23 | #ifdef HAS_NCE |
| 24 | #include "core/arm/nce/patch.h" | 24 | #include "core/arm/nce/patch.h" |
| 25 | #endif | 25 | #endif |
| 26 | 26 | ||
| @@ -93,7 +93,7 @@ std::optional<VAddr> AppLoader_NSO::LoadModule(Kernel::KProcess& process, Core:: | |||
| 93 | 93 | ||
| 94 | // Allocate some space at the beginning if we are patching in PreText mode. | 94 | // Allocate some space at the beginning if we are patching in PreText mode. |
| 95 | const size_t module_start = [&]() -> size_t { | 95 | const size_t module_start = [&]() -> size_t { |
| 96 | #ifdef ARCHITECTURE_arm64 | 96 | #ifdef HAS_NCE |
| 97 | if (patch && patch->GetPatchMode() == Core::NCE::PatchMode::PreText) { | 97 | if (patch && patch->GetPatchMode() == Core::NCE::PatchMode::PreText) { |
| 98 | return patch->GetSectionSize(); | 98 | return patch->GetSectionSize(); |
| 99 | } | 99 | } |
| @@ -155,7 +155,7 @@ std::optional<VAddr> AppLoader_NSO::LoadModule(Kernel::KProcess& process, Core:: | |||
| 155 | std::copy(pi_header.begin() + sizeof(NSOHeader), pi_header.end(), program_image.data()); | 155 | std::copy(pi_header.begin() + sizeof(NSOHeader), pi_header.end(), program_image.data()); |
| 156 | } | 156 | } |
| 157 | 157 | ||
| 158 | #ifdef ARCHITECTURE_arm64 | 158 | #ifdef HAS_NCE |
| 159 | // If we are computing the process code layout and using nce backend, patch. | 159 | // If we are computing the process code layout and using nce backend, patch. |
| 160 | const auto& code = codeset.CodeSegment(); | 160 | const auto& code = codeset.CodeSegment(); |
| 161 | if (patch && patch->GetPatchMode() == Core::NCE::PatchMode::None) { | 161 | if (patch && patch->GetPatchMode() == Core::NCE::PatchMode::None) { |