Files
NX2navi/runtime/loader.c
chrg6 4b23c4da09 Add a JUMP_SLOT relocation's addend when it binds a guest function, and log one on a host function.
The loader added the addend for ABS64 and GLOB_DAT and always dropped it for JUMP_SLOT, though the AArch64 ELF ABI
gives S + A for all three. A JUMP_SLOT that binds a guest function now gets its addend too; one that binds a host
function (an override or an observer, where an offset into the trampoline means nothing) drops it and logs the
relocation, so a module that ever carries one shows up in the log instead of jumping to the wrong place.

Checked: the runtime compiles. The game's three modules hold 11,698 JUMP_SLOT relocations, none with a nonzero addend
(read from the 1.1.1 ExeFS), so nothing changes for this game.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 19:38:18 -05:00

33 KiB