summaryrefslogtreecommitdiffstats
path: root/src/core/loader/nso.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-01-20 20:20:04 +0100
committerbunnei <bunneidev@gmail.com>2018-01-20 20:59:42 +0100
commit2dafd0d287338981d510c19edaeb720c332a968f (patch)
treece461ac05bb2db4b045356944bfa1aa7021dbbde /src/core/loader/nso.cpp
parentPort citra #3352 to yuzu (#103) (diff)
downloadyuzu-2dafd0d287338981d510c19edaeb720c332a968f.tar
yuzu-2dafd0d287338981d510c19edaeb720c332a968f.tar.gz
yuzu-2dafd0d287338981d510c19edaeb720c332a968f.tar.bz2
yuzu-2dafd0d287338981d510c19edaeb720c332a968f.tar.lz
yuzu-2dafd0d287338981d510c19edaeb720c332a968f.tar.xz
yuzu-2dafd0d287338981d510c19edaeb720c332a968f.tar.zst
yuzu-2dafd0d287338981d510c19edaeb720c332a968f.zip
Diffstat (limited to '')
-rw-r--r--src/core/loader/nso.cpp20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/core/loader/nso.cpp b/src/core/loader/nso.cpp
index ef769dd91..77b4f93eb 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) {
+VAddr AppLoader_NSO::LoadModule(const std::string& path, VAddr load_base) {
FileUtil::IOFile file(path, "rb");
if (!file.IsOpen()) {
return {};
@@ -153,21 +153,9 @@ ResultStatus AppLoader_NSO::Load(Kernel::SharedPtr<Kernel::Process>& process) {
process = Kernel::Process::Create("main");
- // Load NSO modules
- VAddr next_load_addr{Memory::PROCESS_IMAGE_VADDR};
- for (const auto& module :
- {"rtld", "sdk", "subsdk0", "subsdk1", "subsdk2", "subsdk3", "subsdk4"}) {
- const std::string path = filepath.substr(0, filepath.find_last_of("/\\")) + "/" + module;
- const VAddr load_addr = next_load_addr;
- next_load_addr = LoadNso(path, load_addr);
- if (next_load_addr) {
- LOG_DEBUG(Loader, "loaded module %s @ 0x%llx", module, load_addr);
- } else {
- next_load_addr = load_addr;
- }
- }
- // Load "main" module
- LoadNso(filepath, next_load_addr);
+ // Load module
+ LoadModule(filepath, Memory::PROCESS_IMAGE_VADDR);
+ LOG_DEBUG(Loader, "loaded module %s @ 0x%llx", filepath.c_str(), Memory::PROCESS_IMAGE_VADDR);
process->svc_access_mask.set();
process->address_mappings = default_address_mappings;