summaryrefslogtreecommitdiff
path: root/src/core/loader/nso.h
diff options
context:
space:
mode:
authorGravatar bunnei2018-10-08 01:19:39 -0400
committerGravatar GitHub2018-10-08 01:19:39 -0400
commitae982a9bdf75970de1e612d824df3f9cf7f5026b (patch)
tree1a03308eaa5c3c6bf55d6eee761446b925ae04f6 /src/core/loader/nso.h
parentMerge pull request #1396 from DarkLordZach/packed-updates (diff)
parentnso/nro: Use default allocation size for arg_data (diff)
downloadyuzu-ae982a9bdf75970de1e612d824df3f9cf7f5026b.tar.gz
yuzu-ae982a9bdf75970de1e612d824df3f9cf7f5026b.tar.xz
yuzu-ae982a9bdf75970de1e612d824df3f9cf7f5026b.zip
Merge pull request #1419 from DarkLordZach/homebrew-args
nso/nro: Add support for passing command-line arguments to executable
Diffstat (limited to 'src/core/loader/nso.h')
-rw-r--r--src/core/loader/nso.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core/loader/nso.h b/src/core/loader/nso.h
index 05353d4d9..70ab3b718 100644
--- a/src/core/loader/nso.h
+++ b/src/core/loader/nso.h
@@ -11,6 +11,15 @@
11 11
12namespace Loader { 12namespace Loader {
13 13
14constexpr u64 NSO_ARGUMENT_DATA_ALLOCATION_SIZE = 0x9000;
15
16struct NSOArgumentHeader {
17 u32_le allocated_size;
18 u32_le actual_size;
19 INSERT_PADDING_BYTES(0x18);
20};
21static_assert(sizeof(NSOArgumentHeader) == 0x20, "NSOArgumentHeader has incorrect size.");
22
14/// Loads an NSO file 23/// Loads an NSO file
15class AppLoader_NSO final : public AppLoader, Linker { 24class AppLoader_NSO final : public AppLoader, Linker {
16public: 25public:
@@ -27,7 +36,7 @@ public:
27 return IdentifyType(file); 36 return IdentifyType(file);
28 } 37 }
29 38
30 static VAddr LoadModule(FileSys::VirtualFile file, VAddr load_base, 39 static VAddr LoadModule(FileSys::VirtualFile file, VAddr load_base, bool should_pass_arguments,
31 boost::optional<FileSys::PatchManager> pm = boost::none); 40 boost::optional<FileSys::PatchManager> pm = boost::none);
32 41
33 ResultStatus Load(Kernel::Process& process) override; 42 ResultStatus Load(Kernel::Process& process) override;