diff options
| author | 2018-09-30 14:04:48 -0400 | |
|---|---|---|
| committer | 2018-10-07 14:30:15 -0400 | |
| commit | e09505ff6147815d7d3c7adcc0d260638cf49706 (patch) | |
| tree | a430bbf3af585ac0e117c28b5782ee9556a2895a /src/core/loader/nso.h | |
| parent | Merge pull request #1396 from DarkLordZach/packed-updates (diff) | |
| download | yuzu-e09505ff6147815d7d3c7adcc0d260638cf49706.tar.gz yuzu-e09505ff6147815d7d3c7adcc0d260638cf49706.tar.xz yuzu-e09505ff6147815d7d3c7adcc0d260638cf49706.zip | |
nso/nro: Add NSO arguments structure to data section
Only added if arguments string is non-empty and a pass is requested by loader.
Diffstat (limited to 'src/core/loader/nso.h')
| -rw-r--r-- | src/core/loader/nso.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/loader/nso.h b/src/core/loader/nso.h index 05353d4d9..7833af6ee 100644 --- a/src/core/loader/nso.h +++ b/src/core/loader/nso.h | |||
| @@ -11,6 +11,13 @@ | |||
| 11 | 11 | ||
| 12 | namespace Loader { | 12 | namespace Loader { |
| 13 | 13 | ||
| 14 | struct NSOArgumentHeader { | ||
| 15 | u32_le allocated_size; | ||
| 16 | u32_le actual_size; | ||
| 17 | INSERT_PADDING_BYTES(0x18); | ||
| 18 | }; | ||
| 19 | static_assert(sizeof(NSOArgumentHeader) == 0x20, "NSOArgumentHeader has incorrect size."); | ||
| 20 | |||
| 14 | /// Loads an NSO file | 21 | /// Loads an NSO file |
| 15 | class AppLoader_NSO final : public AppLoader, Linker { | 22 | class AppLoader_NSO final : public AppLoader, Linker { |
| 16 | public: | 23 | public: |
| @@ -27,7 +34,7 @@ public: | |||
| 27 | return IdentifyType(file); | 34 | return IdentifyType(file); |
| 28 | } | 35 | } |
| 29 | 36 | ||
| 30 | static VAddr LoadModule(FileSys::VirtualFile file, VAddr load_base, | 37 | static VAddr LoadModule(FileSys::VirtualFile file, VAddr load_base, bool should_pass_arguments, |
| 31 | boost::optional<FileSys::PatchManager> pm = boost::none); | 38 | boost::optional<FileSys::PatchManager> pm = boost::none); |
| 32 | 39 | ||
| 33 | ResultStatus Load(Kernel::Process& process) override; | 40 | ResultStatus Load(Kernel::Process& process) override; |