diff options
| author | 2017-09-30 14:15:09 -0400 | |
|---|---|---|
| committer | 2017-09-30 14:33:58 -0400 | |
| commit | 8c92435ded5c9c89290604a03e307c038b4d4117 (patch) | |
| tree | 89640df0ae25ef5c78b79c1d8169f5ad6c25d63b /src/core/loader/elf.cpp | |
| parent | process: Support loading multiple codesets. (diff) | |
| download | yuzu-8c92435ded5c9c89290604a03e307c038b4d4117.tar.gz yuzu-8c92435ded5c9c89290604a03e307c038b4d4117.tar.xz yuzu-8c92435ded5c9c89290604a03e307c038b4d4117.zip | |
nso: Refactor and allocate .bss section.
Diffstat (limited to 'src/core/loader/elf.cpp')
| -rw-r--r-- | src/core/loader/elf.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/loader/elf.cpp b/src/core/loader/elf.cpp index 055bc39de..2efc67ff8 100644 --- a/src/core/loader/elf.cpp +++ b/src/core/loader/elf.cpp | |||
| @@ -401,7 +401,8 @@ ResultStatus AppLoader_ELF::Load() { | |||
| 401 | SharedPtr<CodeSet> codeset = elf_reader.LoadInto(Memory::PROCESS_IMAGE_VADDR); | 401 | SharedPtr<CodeSet> codeset = elf_reader.LoadInto(Memory::PROCESS_IMAGE_VADDR); |
| 402 | codeset->name = filename; | 402 | codeset->name = filename; |
| 403 | 403 | ||
| 404 | Kernel::g_current_process = Kernel::Process::Create(std::move(codeset)); | 404 | Kernel::g_current_process = Kernel::Process::Create("main"); |
| 405 | Kernel::g_current_process->LoadModule(codeset, codeset->entrypoint); | ||
| 405 | Kernel::g_current_process->svc_access_mask.set(); | 406 | Kernel::g_current_process->svc_access_mask.set(); |
| 406 | Kernel::g_current_process->address_mappings = default_address_mappings; | 407 | Kernel::g_current_process->address_mappings = default_address_mappings; |
| 407 | 408 | ||
| @@ -409,7 +410,7 @@ ResultStatus AppLoader_ELF::Load() { | |||
| 409 | Kernel::g_current_process->resource_limit = | 410 | Kernel::g_current_process->resource_limit = |
| 410 | Kernel::ResourceLimit::GetForCategory(Kernel::ResourceLimitCategory::APPLICATION); | 411 | Kernel::ResourceLimit::GetForCategory(Kernel::ResourceLimitCategory::APPLICATION); |
| 411 | 412 | ||
| 412 | Kernel::g_current_process->Run(48, Kernel::DEFAULT_STACK_SIZE); | 413 | Kernel::g_current_process->Run(codeset->entrypoint, 48, Kernel::DEFAULT_STACK_SIZE); |
| 413 | 414 | ||
| 414 | is_loaded = true; | 415 | is_loaded = true; |
| 415 | return ResultStatus::Success; | 416 | return ResultStatus::Success; |