diff options
Diffstat (limited to 'src/core/loader/nso.cpp')
| -rw-r--r-- | src/core/loader/nso.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/core/loader/nso.cpp b/src/core/loader/nso.cpp index d7c47c197..a86653204 100644 --- a/src/core/loader/nso.cpp +++ b/src/core/loader/nso.cpp | |||
| @@ -169,22 +169,21 @@ std::optional<VAddr> AppLoader_NSO::LoadModule(Kernel::Process& process, | |||
| 169 | return load_base + image_size; | 169 | return load_base + image_size; |
| 170 | } | 170 | } |
| 171 | 171 | ||
| 172 | ResultStatus AppLoader_NSO::Load(Kernel::Process& process) { | 172 | AppLoader_NSO::LoadResult AppLoader_NSO::Load(Kernel::Process& process) { |
| 173 | if (is_loaded) { | 173 | if (is_loaded) { |
| 174 | return ResultStatus::ErrorAlreadyLoaded; | 174 | return {ResultStatus::ErrorAlreadyLoaded, {}}; |
| 175 | } | 175 | } |
| 176 | 176 | ||
| 177 | // Load module | 177 | // Load module |
| 178 | const VAddr base_address = process.VMManager().GetCodeRegionBaseAddress(); | 178 | const VAddr base_address = process.VMManager().GetCodeRegionBaseAddress(); |
| 179 | if (!LoadModule(process, *file, base_address, true)) { | 179 | if (!LoadModule(process, *file, base_address, true)) { |
| 180 | return ResultStatus::ErrorLoadingNSO; | 180 | return {ResultStatus::ErrorLoadingNSO, {}}; |
| 181 | } | 181 | } |
| 182 | LOG_DEBUG(Loader, "loaded module {} @ 0x{:X}", file->GetName(), base_address); | 182 | LOG_DEBUG(Loader, "loaded module {} @ 0x{:X}", file->GetName(), base_address); |
| 183 | 183 | ||
| 184 | process.Run(base_address, Kernel::THREADPRIO_DEFAULT, Memory::DEFAULT_STACK_SIZE); | ||
| 185 | |||
| 186 | is_loaded = true; | 184 | is_loaded = true; |
| 187 | return ResultStatus::Success; | 185 | return {ResultStatus::Success, |
| 186 | LoadParameters{Kernel::THREADPRIO_DEFAULT, Memory::DEFAULT_STACK_SIZE}}; | ||
| 188 | } | 187 | } |
| 189 | 188 | ||
| 190 | } // namespace Loader | 189 | } // namespace Loader |