summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-04-21 00:16:31 +0200
committerbunnei <bunneidev@gmail.com>2020-04-21 00:19:45 +0200
commit68039addbc8b572c362adbf2a4615938bbf27c63 (patch)
tree9bbedd14a0625ae33c1839016eb46bf51a2bbf10 /src/core
parentfile_sys: program_metadata: Add a helper function for generating reasonable default metadata. (diff)
downloadyuzu-68039addbc8b572c362adbf2a4615938bbf27c63.tar
yuzu-68039addbc8b572c362adbf2a4615938bbf27c63.tar.gz
yuzu-68039addbc8b572c362adbf2a4615938bbf27c63.tar.bz2
yuzu-68039addbc8b572c362adbf2a4615938bbf27c63.tar.lz
yuzu-68039addbc8b572c362adbf2a4615938bbf27c63.tar.xz
yuzu-68039addbc8b572c362adbf2a4615938bbf27c63.tar.zst
yuzu-68039addbc8b572c362adbf2a4615938bbf27c63.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/loader/elf.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/loader/elf.cpp b/src/core/loader/elf.cpp
index 1e9ed2837..8f7615115 100644
--- a/src/core/loader/elf.cpp
+++ b/src/core/loader/elf.cpp
@@ -398,6 +398,11 @@ AppLoader_ELF::LoadResult AppLoader_ELF::Load(Kernel::Process& process) {
Kernel::CodeSet codeset = elf_reader.LoadInto(base_address);
const VAddr entry_point = codeset.entrypoint;
+ // Setup the process code layout
+ if (process.LoadFromMetadata(FileSys::ProgramMetadata::GetDefault(), buffer.size()).IsError()) {
+ return {ResultStatus::ErrorNotInitialized, {}};
+ }
+
process.LoadModule(std::move(codeset), entry_point);
is_loaded = true;