diff options
author | Lioncash <mathew1800@gmail.com> | 2018-08-28 18:30:33 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-08-29 04:31:51 +0200 |
commit | 0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5 (patch) | |
tree | 2d7bb143d490c3984bff6deda426b818bf27d552 /src/core/loader/elf.cpp | |
parent | Merge pull request #1193 from lioncash/priv (diff) | |
download | yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar.gz yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar.bz2 yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar.lz yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar.xz yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar.zst yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/loader/elf.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/loader/elf.cpp b/src/core/loader/elf.cpp index 6420a7f11..3702a8478 100644 --- a/src/core/loader/elf.cpp +++ b/src/core/loader/elf.cpp @@ -9,6 +9,7 @@ #include "common/common_types.h" #include "common/file_util.h" #include "common/logging/log.h" +#include "core/core.h" #include "core/hle/kernel/process.h" #include "core/hle/kernel/resource_limit.h" #include "core/loader/elf.h" @@ -300,7 +301,8 @@ SharedPtr<CodeSet> ElfReader::LoadInto(u32 vaddr) { std::vector<u8> program_image(total_image_size); size_t current_image_position = 0; - SharedPtr<CodeSet> codeset = CodeSet::Create(""); + auto& kernel = Core::System::GetInstance().Kernel(); + SharedPtr<CodeSet> codeset = CodeSet::Create(kernel, ""); for (unsigned int i = 0; i < header->e_phnum; ++i) { Elf32_Phdr* p = &segments[i]; @@ -400,8 +402,9 @@ ResultStatus AppLoader_ELF::Load(Kernel::SharedPtr<Kernel::Process>& process) { process->svc_access_mask.set(); // Attach the default resource limit (APPLICATION) to the process + auto& kernel = Core::System::GetInstance().Kernel(); process->resource_limit = - Kernel::ResourceLimit::GetForCategory(Kernel::ResourceLimitCategory::APPLICATION); + kernel.ResourceLimitForCategory(Kernel::ResourceLimitCategory::APPLICATION); process->Run(codeset->entrypoint, 48, Memory::DEFAULT_STACK_SIZE); |