diff options
| author | 2018-12-02 22:24:43 -0500 | |
|---|---|---|
| committer | 2018-12-02 23:39:03 -0500 | |
| commit | 7695febfa1f3ef45fbac5fe674c1371c88f483b6 (patch) | |
| tree | 7e92abf7033e72996c8025cabf633b2d47b14229 /src/core/loader/nso.h | |
| parent | loader/nro: Make the static LoadNro function internally linked (diff) | |
| download | yuzu-7695febfa1f3ef45fbac5fe674c1371c88f483b6.tar.gz yuzu-7695febfa1f3ef45fbac5fe674c1371c88f483b6.tar.xz yuzu-7695febfa1f3ef45fbac5fe674c1371c88f483b6.zip | |
loader/nso: Remove dependency on the System class
Similar to the NRO changes, we can also pass the process explicitly as a
parameter from Load instead of indirecting through the System class.
Diffstat (limited to 'src/core/loader/nso.h')
| -rw-r--r-- | src/core/loader/nso.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/loader/nso.h b/src/core/loader/nso.h index 433306139..0c1defbb6 100644 --- a/src/core/loader/nso.h +++ b/src/core/loader/nso.h | |||
| @@ -10,6 +10,10 @@ | |||
| 10 | #include "core/loader/linker.h" | 10 | #include "core/loader/linker.h" |
| 11 | #include "core/loader/loader.h" | 11 | #include "core/loader/loader.h" |
| 12 | 12 | ||
| 13 | namespace Kernel { | ||
| 14 | class Process; | ||
| 15 | } | ||
| 16 | |||
| 13 | namespace Loader { | 17 | namespace Loader { |
| 14 | 18 | ||
| 15 | constexpr u64 NSO_ARGUMENT_DATA_ALLOCATION_SIZE = 0x9000; | 19 | constexpr u64 NSO_ARGUMENT_DATA_ALLOCATION_SIZE = 0x9000; |
| @@ -37,8 +41,8 @@ public: | |||
| 37 | return IdentifyType(file); | 41 | return IdentifyType(file); |
| 38 | } | 42 | } |
| 39 | 43 | ||
| 40 | static std::optional<VAddr> LoadModule(const FileSys::VfsFile& file, VAddr load_base, | 44 | static std::optional<VAddr> LoadModule(Kernel::Process& process, const FileSys::VfsFile& file, |
| 41 | bool should_pass_arguments, | 45 | VAddr load_base, bool should_pass_arguments, |
| 42 | std::optional<FileSys::PatchManager> pm = {}); | 46 | std::optional<FileSys::PatchManager> pm = {}); |
| 43 | 47 | ||
| 44 | ResultStatus Load(Kernel::Process& process) override; | 48 | ResultStatus Load(Kernel::Process& process) override; |