mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-12-23 06:57:08 +00:00
Tested with a binary that has VMA != (LMA | 0x80000000), unlike most
libogc binaries. This is indeed a valid setup for ELFs, and one that is
generally expected to work properly.
Test code: https://github.com/Wii-Linux/NPLL/tree/reloc
In either case, you still need to set the PC in the debugger to get it
to boot properly, though that is a different issue that I will be fixing
in a future patch.
Without this patch, the code to be runtime-relocated ends up already
loaded at the desired final address, and then when the code tries to
relocate from what it thinks is the source address (where the code
should be, where the LMA is) to the destination address (the VMA, where
Dolphin mistakenly already put the code), it ends up overwriting the
code that it is about to execute with garbage, and then promptly
crashing.
After this patch is applied, the behavior now matches the GameCube with
Swiss (assuming a [recent patch](
|
||
|---|---|---|
| .. | ||
| Android | ||
| Core | ||
| DSPSpy | ||
| DSPTool | ||
| PCH | ||
| UnitTests | ||
| VSProps | ||
| .clang-format | ||
| CMakeLists.txt | ||
| dolphin-emu.sln | ||