Merge pull request #497 from PSI-Rockin/poketto_monsutaa

[CRO] Fix faulty data relocations
This commit is contained in:
wheremyfoodat 2024-04-22 23:34:31 +00:00 committed by GitHub
commit 000dc09a30
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

1
.gitignore vendored
View file

@ -65,3 +65,4 @@ fb.bat
*.smdh
config.toml
CMakeSettings.json

View file

@ -437,7 +437,7 @@ public:
const u32 segmentID = mem.read32(segmentTable.offset + 12 * segment + SegmentTable::ID);
switch (segmentID) {
case SegmentTable::SegmentID::DATA:
*oldDataVaddr = segmentOffset + dataVaddr; oldDataSegmentOffset = segmentOffset; segmentOffset = dataVaddr; break;
*oldDataVaddr = segmentOffset + croPointer; oldDataSegmentOffset = segmentOffset; segmentOffset = dataVaddr; break;
case SegmentTable::SegmentID::BSS: segmentOffset = bssVaddr; break;
case SegmentTable::SegmentID::TEXT:
case SegmentTable::SegmentID::RODATA: