mirror of
https://github.com/wiiu-env/CustomRPXLoader.git
synced 2024-11-21 17:39:16 +01:00
Fix loading rpx with ".wut_load_bounds" section
This commit is contained in:
parent
187bfdac65
commit
2288b67703
@ -58,6 +58,7 @@ IMPORT(OSCompareAndSwapAtomicEx);
|
||||
IMPORT(OSCompareAndSwapAtomic);
|
||||
IMPORT(OSGetThreadSpecific);
|
||||
IMPORT(OSSetThreadSpecific);
|
||||
IMPORT(FSTimeToCalendarTime);
|
||||
|
||||
IMPORT(exit);
|
||||
IMPORT(_Exit);
|
||||
|
@ -83,7 +83,7 @@ ModuleDataFactory::load(const std::string &path, uint32_t destination_address, u
|
||||
|
||||
for (uint32_t i = 0; i < sec_num; ++i) {
|
||||
section *psec = reader.sections[i];
|
||||
if (psec->get_type() == 0x80000002) {
|
||||
if (psec->get_type() == 0x80000002 || psec->get_name() == ".wut_load_bounds") {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -103,8 +103,10 @@ ModuleDataFactory::load(const std::string &path, uint32_t destination_address, u
|
||||
destination -= 0x10000000;
|
||||
destinations[psec->get_index()] -= 0x10000000;
|
||||
} else if (address >= 0xC0000000) {
|
||||
destination -= 0xC0000000;
|
||||
destinations[psec->get_index()] -= 0xC0000000;
|
||||
DEBUG_FUNCTION_LINE("Loading section from 0xC0000000 is NOT supported");
|
||||
free(destinations);
|
||||
free(buffer);
|
||||
return {};
|
||||
} else {
|
||||
DEBUG_FUNCTION_LINE("Unhandled case");
|
||||
free(destinations);
|
||||
|
Loading…
Reference in New Issue
Block a user