Correct the Raku progress callback and link its thread #851

Merged
coah80 merged 1 commits from agent/bittle/rakuraku-thread-link into main 2026-10-02 18:32:08 +00:00
coah80 commented 2026-10-02 18:30:05 +00:00 (Migrated from github.com)

Fix the reconstructed callback type and remove an extra forwarding function, then enable native linkage after #849.

Evidence

  • The original ATERMi_ApConfigStart call passes the address of the 108-byte syncRakuProgress body directly. Its incoming r3 is a RakuProgress pointer, whose fields are copied into sRakuStatus.
  • The previous source modeled that body as a no-argument member, cast progress data to RakuRakuThread*, and introduced a 4-byte static progressCallback tail-call wrapper. The wrapper is absent from the original and shifts all later text by four bytes when linked.
  • Make syncRakuProgress itself the typed static callback, access *progress directly, and pass it without the wrapper. Update only its reconstructed mangling; original address 813FDA04, size 0x6C and local scope are unchanged.
  • No shared headers, padding, forced retention, compiler options, or assembly changes.

Verification after rebase on e9114959c9

  • 14/14 exact-name objdiff functions remain exact; raw ctx is now 14/14 zero-diff, including the callback address in start(). Code 2,168/2,168 and data 456/456 exact, fully linked.
  • +2,168 linked code, +456 linked data, +1 completed unit. No new matching attribution claimed.
  • Full 43U all_source/progress/report/ok build passes; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d.
  • Pool identical 1/1. Literal audit: 14 functions, 1 argument, no candidates/errors/skips.
  • All 1,027 native objects audited: only RakuRakuThread .text changes (2,172 -> 2,168 bytes), removing the wrapper and correcting its callback relocation. All allocated data and other objects unchanged. No matching regressions after accounting for the corrected symbol name.
  • Link-address audit zero differences. Tests: workflow 8, literal 36, jump-table 27, pool 8 pass. Diff/worktree checks pass.
  • Published tree 782917fcf1 equals tested local tree.

Draft for review; no merge performed.

Note

Fix Raku progress callback to pass RakuProgress to RakuRakuThread.syncRakuProgress

  • Makes syncRakuProgress a static function that takes a RakuProgress pointer and copies it into sRakuStatus. The old callback wrongly cast the progress payload to a RakuRakuThread instance.
  • Removes the progressCallback forwarding wrapper and passes syncRakuProgress directly to ATERMi_ApConfigStart in start.
  • Updates the symbol at address 0x813FDA04 in symbols.txt to match the new signature, and marks iplRakuRakuThread.cpp as Matching in configure.py.

Macroscope summarized 23e373e.

Fix the reconstructed callback type and remove an extra forwarding function, then enable native linkage after #849. ## Evidence - The original ATERMi_ApConfigStart call passes the address of the 108-byte syncRakuProgress body directly. Its incoming r3 is a RakuProgress pointer, whose fields are copied into sRakuStatus. - The previous source modeled that body as a no-argument member, cast progress data to RakuRakuThread*, and introduced a 4-byte static progressCallback tail-call wrapper. The wrapper is absent from the original and shifts all later text by four bytes when linked. - Make syncRakuProgress itself the typed static callback, access *progress directly, and pass it without the wrapper. Update only its reconstructed mangling; original address 813FDA04, size 0x6C and local scope are unchanged. - No shared headers, padding, forced retention, compiler options, or assembly changes. ## Verification after rebase on e9114959c9535e9abe5305d24119f514259c69ec - 14/14 exact-name objdiff functions remain exact; raw ctx is now 14/14 zero-diff, including the callback address in start(). Code 2,168/2,168 and data 456/456 exact, fully linked. - +2,168 linked code, +456 linked data, +1 completed unit. No new matching attribution claimed. - Full 43U all_source/progress/report/ok build passes; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. - Pool identical 1/1. Literal audit: 14 functions, 1 argument, no candidates/errors/skips. - All 1,027 native objects audited: only RakuRakuThread .text changes (2,172 -> 2,168 bytes), removing the wrapper and correcting its callback relocation. All allocated data and other objects unchanged. No matching regressions after accounting for the corrected symbol name. - Link-address audit zero differences. Tests: workflow 8, literal 36, jump-table 27, pool 8 pass. Diff/worktree checks pass. - Published tree 782917fcf1bac4a8ee6516d8fe5e40c405e24a8e equals tested local tree. Draft for review; no merge performed. <!-- Macroscope's pull request summary starts here --> <!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. --> <!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. --> > [!NOTE] > ### Fix Raku progress callback to pass `RakuProgress` to `RakuRakuThread.syncRakuProgress` > - Makes `syncRakuProgress` a static function that takes a `RakuProgress` pointer and copies it into `sRakuStatus`. The old callback wrongly cast the progress payload to a `RakuRakuThread` instance. > - Removes the `progressCallback` forwarding wrapper and passes `syncRakuProgress` directly to `ATERMi_ApConfigStart` in `start`. > - Updates the symbol at address `0x813FDA04` in [symbols.txt](https://github.com/coah80/wii-ipl/pull/851/files#diff-92f49dd4754762deffc0a2c26a42d508945e86a4db65a437b06cd7a740fab114) to match the new signature, and marks [iplRakuRakuThread.cpp](https://github.com/coah80/wii-ipl/pull/851/files#diff-96c56e87b618c092b128be21f7a6c9efad4fc4f6c40353a3b329a1e3b3dbb7dd) as Matching in [configure.py](https://github.com/coah80/wii-ipl/pull/851/files#diff-4d5f3192809ec1b9add6b33007e0c50031ad9a0a2f3f55a481b506468824db2c). > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 23e373e.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-02 18:32:05 +00:00 (Migrated from github.com)

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.
Sign in to join this conversation.