diff options
| author | Subv <subv2112@gmail.com> | 2018-02-27 10:22:15 -0500 |
|---|---|---|
| committer | Subv <subv2112@gmail.com> | 2018-03-01 19:03:53 -0500 |
| commit | 827f8ca3c77ad0b7e667c64b5c983b3b3ffe8d7d (patch) | |
| tree | e557f60eddcd74f0ab380a81dd42749b3e46ef4e /src/core/loader/deconstructed_rom_directory.cpp | |
| parent | cc6e4ae6cf496f787c5277135aaa3e63cb98b780 (diff) | |
Kernel: Store the program id in the Process class instead of the CodeSet class.
There may be many CodeSets per Process, so it's wasteful and overcomplicated to store the program id in each of them.
Diffstat (limited to 'src/core/loader/deconstructed_rom_directory.cpp')
| -rw-r--r-- | src/core/loader/deconstructed_rom_directory.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/loader/deconstructed_rom_directory.cpp b/src/core/loader/deconstructed_rom_directory.cpp index 864cf25cd..459d127c2 100644 --- a/src/core/loader/deconstructed_rom_directory.cpp +++ b/src/core/loader/deconstructed_rom_directory.cpp @@ -110,8 +110,6 @@ ResultStatus AppLoader_DeconstructedRomDirectory::Load( return ResultStatus::Error; } - process = Kernel::Process::Create("main"); - const std::string directory = filepath.substr(0, filepath.find_last_of("/\\")) + DIR_SEP; const std::string npdm_path = directory + DIR_SEP + "main.npdm"; @@ -121,13 +119,15 @@ ResultStatus AppLoader_DeconstructedRomDirectory::Load( } metadata.Print(); + process = Kernel::Process::Create("main", metadata.GetTitleID()); + // Load NSO modules VAddr next_load_addr{Memory::PROCESS_IMAGE_VADDR}; for (const auto& module : {"rtld", "main", "subsdk0", "subsdk1", "subsdk2", "subsdk3", "subsdk4", "subsdk5", "subsdk6", "subsdk7", "sdk"}) { const std::string path = directory + DIR_SEP + module; const VAddr load_addr = next_load_addr; - next_load_addr = AppLoader_NSO::LoadModule(path, load_addr, metadata.GetTitleID()); + next_load_addr = AppLoader_NSO::LoadModule(path, load_addr); if (next_load_addr) { LOG_DEBUG(Loader, "loaded module %s @ 0x%" PRIx64, module, load_addr); } else { |
