summaryrefslogtreecommitdiff
path: root/src/core/loader/3dsx.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2017-09-30 14:15:09 -0400
committerGravatar bunnei2017-09-30 14:33:58 -0400
commit8c92435ded5c9c89290604a03e307c038b4d4117 (patch)
tree89640df0ae25ef5c78b79c1d8169f5ad6c25d63b /src/core/loader/3dsx.cpp
parentprocess: Support loading multiple codesets. (diff)
downloadyuzu-8c92435ded5c9c89290604a03e307c038b4d4117.tar.gz
yuzu-8c92435ded5c9c89290604a03e307c038b4d4117.tar.xz
yuzu-8c92435ded5c9c89290604a03e307c038b4d4117.zip
nso: Refactor and allocate .bss section.
Diffstat (limited to 'src/core/loader/3dsx.cpp')
-rw-r--r--src/core/loader/3dsx.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/loader/3dsx.cpp b/src/core/loader/3dsx.cpp
index 74e336487..209328347 100644
--- a/src/core/loader/3dsx.cpp
+++ b/src/core/loader/3dsx.cpp
@@ -267,7 +267,8 @@ ResultStatus AppLoader_THREEDSX::Load() {
267 return ResultStatus::Error; 267 return ResultStatus::Error;
268 codeset->name = filename; 268 codeset->name = filename;
269 269
270 Kernel::g_current_process = Kernel::Process::Create(std::move(codeset)); 270 Kernel::g_current_process = Kernel::Process::Create("main");
271 Kernel::g_current_process->LoadModule(codeset, codeset->entrypoint);
271 Kernel::g_current_process->svc_access_mask.set(); 272 Kernel::g_current_process->svc_access_mask.set();
272 Kernel::g_current_process->address_mappings = default_address_mappings; 273 Kernel::g_current_process->address_mappings = default_address_mappings;
273 274
@@ -275,7 +276,7 @@ ResultStatus AppLoader_THREEDSX::Load() {
275 Kernel::g_current_process->resource_limit = 276 Kernel::g_current_process->resource_limit =
276 Kernel::ResourceLimit::GetForCategory(Kernel::ResourceLimitCategory::APPLICATION); 277 Kernel::ResourceLimit::GetForCategory(Kernel::ResourceLimitCategory::APPLICATION);
277 278
278 Kernel::g_current_process->Run(48, Kernel::DEFAULT_STACK_SIZE); 279 Kernel::g_current_process->Run(codeset->entrypoint, 48, Kernel::DEFAULT_STACK_SIZE);
279 280
280 Service::FS::RegisterArchiveType(std::make_unique<FileSys::ArchiveFactory_SelfNCCH>(*this), 281 Service::FS::RegisterArchiveType(std::make_unique<FileSys::ArchiveFactory_SelfNCCH>(*this),
281 Service::FS::ArchiveIdCode::SelfNCCH); 282 Service::FS::ArchiveIdCode::SelfNCCH);