diff options
| author | bunnei <bunneidev@gmail.com> | 2020-04-21 18:59:16 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-21 18:59:16 -0400 |
| commit | 0ff5fd28d6bb44455da7049ffb7deab172ccd467 (patch) | |
| tree | ec4adafd6b8f513a4d37e4594dfa864df4d6bb17 /src/core/file_sys/program_metadata.cpp | |
| parent | 89ba13c7d24ed2fdae4c195e573858192d012677 (diff) | |
| parent | 405c9b15c98b15dd2c55a7641d70a7db408b9c79 (diff) | |
Merge pull request #3745 from bunnei/fix-homebrew-load
Fix process memory initialization for ELF and NRO
Diffstat (limited to 'src/core/file_sys/program_metadata.cpp')
| -rw-r--r-- | src/core/file_sys/program_metadata.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/file_sys/program_metadata.cpp b/src/core/file_sys/program_metadata.cpp index 1d6c309621..43169bf9f4 100644 --- a/src/core/file_sys/program_metadata.cpp +++ b/src/core/file_sys/program_metadata.cpp @@ -51,6 +51,17 @@ Loader::ResultStatus ProgramMetadata::Load(VirtualFile file) { return Loader::ResultStatus::Success; } +/*static*/ ProgramMetadata ProgramMetadata::GetDefault() { + ProgramMetadata result; + + result.LoadManual( + true /*is_64_bit*/, FileSys::ProgramAddressSpaceType::Is39Bit /*address_space*/, + 0x2c /*main_thread_prio*/, 0 /*main_thread_core*/, 0x00100000 /*main_thread_stack_size*/, + {}, 0xFFFFFFFFFFFFFFFF /*filesystem_permissions*/, {} /*capabilities*/); + + return result; +} + void ProgramMetadata::LoadManual(bool is_64_bit, ProgramAddressSpaceType address_space, s32 main_thread_prio, u32 main_thread_core, u32 main_thread_stack_size, u64 title_id, |
