mirror of
https://github.com/wiiu-env/EnvironmentLoader.git
synced 2024-12-27 05:21:56 +01:00
Fix setting the startAddress of modules
This commit is contained in:
parent
a2f04afd09
commit
1fc0b0d8de
@ -56,6 +56,7 @@ ModuleDataFactory::load(const std::string &path, uint32_t destination_address_en
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint32_t baseOffset = (destination_address_end - sizeOfModule) & 0xFFFFFF00;
|
uint32_t baseOffset = (destination_address_end - sizeOfModule) & 0xFFFFFF00;
|
||||||
|
uint32_t startAddress = baseOffset;
|
||||||
|
|
||||||
uint32_t offset_text = baseOffset;
|
uint32_t offset_text = baseOffset;
|
||||||
uint32_t offset_data = offset_text;
|
uint32_t offset_data = offset_text;
|
||||||
@ -152,7 +153,7 @@ ModuleDataFactory::load(const std::string &path, uint32_t destination_address_en
|
|||||||
|
|
||||||
free(destinations);
|
free(destinations);
|
||||||
|
|
||||||
moduleData->setStartAddress(baseOffset);
|
moduleData->setStartAddress(startAddress);
|
||||||
moduleData->setEndAddress(endAddress);
|
moduleData->setEndAddress(endAddress);
|
||||||
moduleData->setEntrypoint(entrypoint);
|
moduleData->setEntrypoint(entrypoint);
|
||||||
DEBUG_FUNCTION_LINE("Saved entrypoint as %08X", entrypoint);
|
DEBUG_FUNCTION_LINE("Saved entrypoint as %08X", entrypoint);
|
||||||
|
Loading…
Reference in New Issue
Block a user