dolphin/Source/Core
techflashYT b2a57f4391 Core/Boot: Fix ELF load address semantics
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](bb4a57186c)
is applied), and the Wii with the Homebrew Channel.
2025-11-13 06:20:21 -07:00
..
AudioCommon CubebStream: Use WorkQueueThread::PushBlocking instead of sync_event 2025-11-07 13:19:18 -08:00
Common Merge pull request #14052 from jordan-woyak/DirectIOFile 2025-11-10 17:29:43 -06:00
Core Core/Boot: Fix ELF load address semantics 2025-11-13 06:20:21 -07:00
DiscIO DiscIO: Make all BlobReader implementations use DirectIOFile to make CopyReader functionality thread safe. 2025-11-09 03:08:14 -06:00
DolphinNoGUI Core: Make AddOnStateChangedCallback use HookableEvent. 2025-11-09 16:43:19 -06:00
DolphinQt Merge pull request #14100 from AndrewGDX/master 2025-11-12 16:43:21 -06:00
DolphinTool
InputCommon Common: Remove the string parameters from the HookableEvent interface. 2025-11-06 22:34:40 -06:00
MacUpdater
UICommon Common: Make HookableEvent use non-static data. 2025-11-02 17:30:43 -06:00
UpdaterCommon
VideoBackends Merge pull request #14042 from iwubcode/bp_functions_global 2025-11-02 13:17:38 -05:00
VideoCommon Merge pull request #14100 from AndrewGDX/master 2025-11-12 16:43:21 -06:00
WinUpdater
CMakeLists.txt
DolphinLib.ARM64.props
DolphinLib.props Common: Add a DirectIOFile class that allows for copies which are entirely thread safe. 2025-11-09 03:08:14 -06:00
DolphinLib.vcxproj Core/HW: Add Broadband Adapter (IPC). 2025-10-28 18:50:59 +00:00
DolphinLib.vcxproj.user
DolphinLib.x64.props
VersionInfo.plist.in