fix: model Run stack address independently of printf #982
Reference in New Issue
Block a user
Delete Branch "agent/bittle/run-fixed-stack"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Narrow correction to #973 — please review metadata attribution
Run already contains the required architecture-bound assembly. This PR adds no instructions and is not another Run implementation or a new match.
The verified original DOL establishes SP as 0x81600000 at instructions 0x8137B468/0x8137B46C. Automatic extraction bound their HI/LO operands to
__pformatter + 0x280, which happens to have that address but is an unrelated formatted-output function. The reconstruction should not make its boot stack depend on formatter placement.Remove the unrelated extern, use the fixed high/low immediate, and block exactly those two false relocations. DTK block_relocations requires instruction addresses, not the ELF immediate halfword offsets at Run+0x7E/+0x82. All register clearing, labels, cache loop, original zero-count wrap behavior, LR transfer and linking flags remain unchanged.
Fresh independent verification on
813660b94f7fae9fadequals tested tree.No retail .s substitution, byte transplant, padding, new forced-register use or linking change. The separate full-Run experiment was superseded by #973 and is deliberately excluded. Left for review; no merge performed.
Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.