summaryrefslogtreecommitdiff
path: root/src/core/loader/nso.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/loader/nso.h')
-rw-r--r--src/core/loader/nso.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/core/loader/nso.h b/src/core/loader/nso.h
index a24bcdc24..1ae30a824 100644
--- a/src/core/loader/nso.h
+++ b/src/core/loader/nso.h
@@ -4,10 +4,8 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <map>
8#include <string> 7#include <string>
9#include "common/common_types.h" 8#include "common/common_types.h"
10#include "common/file_util.h"
11#include "core/hle/kernel/kernel.h" 9#include "core/hle/kernel/kernel.h"
12#include "core/loader/linker.h" 10#include "core/loader/linker.h"
13#include "core/loader/loader.h" 11#include "core/loader/loader.h"
@@ -17,25 +15,25 @@ namespace Loader {
17/// Loads an NSO file 15/// Loads an NSO file
18class AppLoader_NSO final : public AppLoader, Linker { 16class AppLoader_NSO final : public AppLoader, Linker {
19public: 17public:
20 AppLoader_NSO(FileUtil::IOFile&& file, std::string filepath) 18 AppLoader_NSO(FileUtil::IOFile&& file, std::string filepath);
21 : AppLoader(std::move(file)), filepath(std::move(filepath)) {}
22 19
23 /** 20 /**
24 * Returns the type of the file 21 * Returns the type of the file
25 * @param file FileUtil::IOFile open file 22 * @param file FileUtil::IOFile open file
23 * @param filepath Path of the file that we are opening.
26 * @return FileType found, or FileType::Error if this loader doesn't know it 24 * @return FileType found, or FileType::Error if this loader doesn't know it
27 */ 25 */
28 static FileType IdentifyType(FileUtil::IOFile& file); 26 static FileType IdentifyType(FileUtil::IOFile& file, const std::string& filepath);
29 27
30 FileType GetFileType() override { 28 FileType GetFileType() override {
31 return IdentifyType(file); 29 return IdentifyType(file, filepath);
32 } 30 }
33 31
32 static VAddr LoadModule(const std::string& path, VAddr load_base);
33
34 ResultStatus Load(Kernel::SharedPtr<Kernel::Process>& process) override; 34 ResultStatus Load(Kernel::SharedPtr<Kernel::Process>& process) override;
35 35
36private: 36private:
37 VAddr LoadNso(const std::string& path, VAddr load_base);
38
39 std::string filepath; 37 std::string filepath;
40}; 38};
41 39