Fix module loading

This commit is contained in:
Maschell 2020-10-19 00:12:19 +02:00
parent d92144561e
commit 84e3764447

View File

@ -82,7 +82,7 @@ extern "C" int _start(int argc, char **argv) {
moduleDataStartAddress = (moduleDataStartAddress + 0x10000) & 0xFFFF0000; moduleDataStartAddress = (moduleDataStartAddress + 0x10000) & 0xFFFF0000;
std::optional<ModuleData> moduleData = ModuleDataFactory::load("fs:/vol/external01/wiiu/payload.rpx", 0x00FFF000, 0x00FFF000 - ApplicationMemoryEnd - (sizeof(module_information_t)), gModuleData->trampolines, DYN_LINK_TRAMPOLIN_LIST_LENGTH); std::optional<ModuleData> moduleData = ModuleDataFactory::load("fs:/vol/external01/wiiu/payload.rpx", 0x00FFF000, 0x00FFF000 - ApplicationMemoryEnd - (sizeof(module_information_t)), gModuleData->trampolines, DYN_LINK_TRAMPOLIN_LIST_LENGTH);
if (!moduleData) { if (moduleData) {
DEBUG_FUNCTION_LINE("Loaded module data"); DEBUG_FUNCTION_LINE("Loaded module data");
std::vector<RelocationData> relocData = moduleData->getRelocationDataList(); std::vector<RelocationData> relocData = moduleData->getRelocationDataList();
if (!doRelocation(relocData, gModuleData->trampolines, DYN_LINK_TRAMPOLIN_LIST_LENGTH)) { if (!doRelocation(relocData, gModuleData->trampolines, DYN_LINK_TRAMPOLIN_LIST_LENGTH)) {