mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-06 06:05:40 +12:00
[CRO] Offset the old data address by the start of the CRO
The old logic caused bad data relocations
This commit is contained in:
parent
466e67a2fd
commit
b797c92b2e
2 changed files with 2 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -65,3 +65,4 @@ fb.bat
|
|||
*.smdh
|
||||
|
||||
config.toml
|
||||
CMakeSettings.json
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue