mirror of
https://github.com/wiiu-env/CustomRPXLoader.git
synced 2024-11-14 22:45:07 +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(OSCompareAndSwapAtomic);
|
||||||
IMPORT(OSGetThreadSpecific);
|
IMPORT(OSGetThreadSpecific);
|
||||||
IMPORT(OSSetThreadSpecific);
|
IMPORT(OSSetThreadSpecific);
|
||||||
|
IMPORT(FSTimeToCalendarTime);
|
||||||
|
|
||||||
IMPORT(exit);
|
IMPORT(exit);
|
||||||
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) {
|
for (uint32_t i = 0; i < sec_num; ++i) {
|
||||||
section *psec = reader.sections[i];
|
section *psec = reader.sections[i];
|
||||||
if (psec->get_type() == 0x80000002) {
|
if (psec->get_type() == 0x80000002 || psec->get_name() == ".wut_load_bounds") {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,8 +103,10 @@ ModuleDataFactory::load(const std::string &path, uint32_t destination_address, u
|
|||||||
destination -= 0x10000000;
|
destination -= 0x10000000;
|
||||||
destinations[psec->get_index()] -= 0x10000000;
|
destinations[psec->get_index()] -= 0x10000000;
|
||||||
} else if (address >= 0xC0000000) {
|
} else if (address >= 0xC0000000) {
|
||||||
destination -= 0xC0000000;
|
DEBUG_FUNCTION_LINE("Loading section from 0xC0000000 is NOT supported");
|
||||||
destinations[psec->get_index()] -= 0xC0000000;
|
free(destinations);
|
||||||
|
free(buffer);
|
||||||
|
return {};
|
||||||
} else {
|
} else {
|
||||||
DEBUG_FUNCTION_LINE("Unhandled case");
|
DEBUG_FUNCTION_LINE("Unhandled case");
|
||||||
free(destinations);
|
free(destinations);
|
||||||
|
Loading…
Reference in New Issue
Block a user