diff options
author | Lioncash <mathew1800@gmail.com> | 2018-09-25 02:01:45 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-09-25 04:16:03 +0200 |
commit | 83377113bfe7791483a1b67e06dd0f51620c04ec (patch) | |
tree | d766a2d2f20d247e8663c1a76d5c41fcf7f643d4 /src/core/loader/nro.cpp | |
parent | svc: Report correct memory-related values within some of the cases in svcGetInfo() (diff) | |
download | yuzu-83377113bfe7791483a1b67e06dd0f51620c04ec.tar yuzu-83377113bfe7791483a1b67e06dd0f51620c04ec.tar.gz yuzu-83377113bfe7791483a1b67e06dd0f51620c04ec.tar.bz2 yuzu-83377113bfe7791483a1b67e06dd0f51620c04ec.tar.lz yuzu-83377113bfe7791483a1b67e06dd0f51620c04ec.tar.xz yuzu-83377113bfe7791483a1b67e06dd0f51620c04ec.tar.zst yuzu-83377113bfe7791483a1b67e06dd0f51620c04ec.zip |
Diffstat (limited to '')
-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 @@ #include "core/gdbstub/gdbstub.h" #include "core/hle/kernel/kernel.h" #include "core/hle/kernel/process.h" +#include "core/hle/kernel/vm_manager.h" #include "core/loader/nro.h" #include "core/memory.h" @@ -180,13 +181,13 @@ ResultStatus AppLoader_NRO::Load(Kernel::SharedPtr<Kernel::Process>& process) { } // Load NRO - static constexpr VAddr base_addr{Memory::PROCESS_IMAGE_VADDR}; + const VAddr base_address = process->vm_manager.GetCodeRegionBaseAddress(); - if (!LoadNro(file, base_addr)) { + if (!LoadNro(file, base_address)) { return ResultStatus::ErrorLoadingNRO; } - process->Run(base_addr, Kernel::THREADPRIO_DEFAULT, Memory::DEFAULT_STACK_SIZE); + process->Run(base_address, Kernel::THREADPRIO_DEFAULT, Memory::DEFAULT_STACK_SIZE); is_loaded = true; return ResultStatus::Success; |