summaryrefslogtreecommitdiffstats
path: root/src/core/loader/nso.cpp
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-01-17 21:01:10 +0100
committergdkchan <gab.dark.100@gmail.com>2018-01-17 21:01:10 +0100
commitc65ac492380f5baa85cb3225723b4363d07a2361 (patch)
treefc112e8115f6cb9f2e5d19c94fdd7232cd2d38ef /src/core/loader/nso.cpp
parentMerge pull request #42 from N00byKing/3295 (diff)
downloadyuzu-c65ac492380f5baa85cb3225723b4363d07a2361.tar
yuzu-c65ac492380f5baa85cb3225723b4363d07a2361.tar.gz
yuzu-c65ac492380f5baa85cb3225723b4363d07a2361.tar.bz2
yuzu-c65ac492380f5baa85cb3225723b4363d07a2361.tar.lz
yuzu-c65ac492380f5baa85cb3225723b4363d07a2361.tar.xz
yuzu-c65ac492380f5baa85cb3225723b4363d07a2361.tar.zst
yuzu-c65ac492380f5baa85cb3225723b4363d07a2361.zip
Diffstat (limited to '')
-rw-r--r--src/core/loader/nso.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/core/loader/nso.cpp b/src/core/loader/nso.cpp
index ff96e129b..ef769dd91 100644
--- a/src/core/loader/nso.cpp
+++ b/src/core/loader/nso.cpp
@@ -88,7 +88,7 @@ static constexpr u32 PageAlignSize(u32 size) {
return (size + Memory::PAGE_MASK) & ~Memory::PAGE_MASK;
}
-VAddr AppLoader_NSO::LoadNso(const std::string& path, VAddr load_base, bool relocate) {
+VAddr AppLoader_NSO::LoadNso(const std::string& path, VAddr load_base) {
FileUtil::IOFile file(path, "rb");
if (!file.IsOpen()) {
return {};
@@ -135,12 +135,6 @@ VAddr AppLoader_NSO::LoadNso(const std::string& path, VAddr load_base, bool relo
const u32 image_size{PageAlignSize(static_cast<u32>(program_image.size()) + bss_size)};
program_image.resize(image_size);
- // Relocate symbols if there was a proper MOD header - This must happen after the image has been
- // loaded into memory
- if (has_mod_header && relocate) {
- Relocate(program_image, module_offset + mod_header.dynamic_offset, load_base);
- }
-
// Load codeset for current process
codeset->name = path;
codeset->memory = std::make_shared<std::vector<u8>>(std::move(program_image));
@@ -181,8 +175,6 @@ ResultStatus AppLoader_NSO::Load(Kernel::SharedPtr<Kernel::Process>& process) {
Kernel::ResourceLimit::GetForCategory(Kernel::ResourceLimitCategory::APPLICATION);
process->Run(Memory::PROCESS_IMAGE_VADDR, 48, Kernel::DEFAULT_STACK_SIZE);
- ResolveImports();
-
is_loaded = true;
return ResultStatus::Success;
}