diff options
Diffstat (limited to 'src/core/loader/nro.cpp')
| -rw-r--r-- | src/core/loader/nro.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/loader/nro.cpp b/src/core/loader/nro.cpp index 2385012eb..b72871efa 100644 --- a/src/core/loader/nro.cpp +++ b/src/core/loader/nro.cpp | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include "core/gdbstub/gdbstub.h" | 16 | #include "core/gdbstub/gdbstub.h" |
| 17 | #include "core/hle/kernel/kernel.h" | 17 | #include "core/hle/kernel/kernel.h" |
| 18 | #include "core/hle/kernel/process.h" | 18 | #include "core/hle/kernel/process.h" |
| 19 | #include "core/hle/kernel/vm_manager.h" | ||
| 19 | #include "core/loader/nro.h" | 20 | #include "core/loader/nro.h" |
| 20 | #include "core/memory.h" | 21 | #include "core/memory.h" |
| 21 | 22 | ||
| @@ -180,13 +181,13 @@ ResultStatus AppLoader_NRO::Load(Kernel::SharedPtr<Kernel::Process>& process) { | |||
| 180 | } | 181 | } |
| 181 | 182 | ||
| 182 | // Load NRO | 183 | // Load NRO |
| 183 | static constexpr VAddr base_addr{Memory::PROCESS_IMAGE_VADDR}; | 184 | const VAddr base_address = process->vm_manager.GetCodeRegionBaseAddress(); |
| 184 | 185 | ||
| 185 | if (!LoadNro(file, base_addr)) { | 186 | if (!LoadNro(file, base_address)) { |
| 186 | return ResultStatus::ErrorLoadingNRO; | 187 | return ResultStatus::ErrorLoadingNRO; |
| 187 | } | 188 | } |
| 188 | 189 | ||
| 189 | process->Run(base_addr, Kernel::THREADPRIO_DEFAULT, Memory::DEFAULT_STACK_SIZE); | 190 | process->Run(base_address, Kernel::THREADPRIO_DEFAULT, Memory::DEFAULT_STACK_SIZE); |
| 190 | 191 | ||
| 191 | is_loaded = true; | 192 | is_loaded = true; |
| 192 | return ResultStatus::Success; | 193 | return ResultStatus::Success; |