Restore focus-object layout and enable native linking #814

Merged
coah80 merged 1 commits from agent/bittle/focus-object-link into main 2026-10-02 11:40:57 +00:00
coah80 commented 2026-10-02 11:39:53 +00:00 (Migrated from github.com)

Following #808. This intentionally changes two shared headers; all 1,027 native objects were rebuilt and audited.

Three linking blockers fixed

  1. Define the existing shared scPaneName_B_Stop string in its owning focus-object unit and use it there, preserving all 176 .sdata bytes. The linked Button unit already references this symbol; flag-only linking failed undefined-symbol resolution. No new section attribute or storage padding.
  2. Move the unchanged scroller::calc body out of the header to its original end-of-unit position (8139BC14, 128 bytes). Remove the old never_inline /for now/ attribute. This also removes one redundant 128-byte weak copy from iplSDMemory; every owned function and match there is preserved.
  3. Declare the existing VEC3 float multiply in this TU and define its unchanged inline body after cmn_calc, so the 28-byte conversion constructor precedes the 32-byte multiply as in the original. Other TUs retain the existing in-class definition, following the header's established per-TU definition-placement pattern.

No algorithm, compiler option, symbol/split metadata, vtable padding, or retail assembly changes.

Verification after rebase on 7be7f1594e

  • FocusObject: 89/89 exact-name objdiff functions, 20,332/20,332 code and 2,576/2,576 data exact, now fully linked.
  • +20,332 linked code, +2,576 linked data, +1 completed unit. No new matching attribution claimed.
  • Full 43U all_source/progress/report/ok and clean source rebuild pass; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. Fresh fetch confirms tested base is origin/main.
  • Raw instruction audit: 88 functions have zero differences. make_gui_mgr has only two symbolic-relocation representation differences for the deduplicated PaneManager weak vtable (named global vs local .data+2016); linked DOL is byte-exact. scroller::calc is 32/32 instructions, zero differences.
  • Pool identical 80/80; literal audit 89 functions, 77 arguments, no candidates/errors/skips. Link-address audit zero differences.
  • All 1,027 objects audited: only FocusObject .text ordering and SDMemory .text removal of the redundant weak scroller::calc differ. All allocated data bytes/relocations unchanged; all other objects unchanged. No unit-code/data/function or previously exact-function regressions.
  • Tests: workflow 8, literal 36, jump-table 27, pool 8 pass. Diff/worktree checks pass.
  • Published tree 76c02915e7 equals tested local tree.

Draft for review; no merge performed.

Note

Restore focus-object layout and enable native linking

Restores the original build layout for the focus-object code so it can be linked natively.

  • Marks iplFocusObject.cpp as Matching instead of Equivalent in configure.py
  • Moves scroller::calc out of iplFocusObject.h into iplFocusObject.cpp, guarded by the IPL_FOCUS_OBJECT_CPP define
  • Defines the VEC3 f32 scalar-multiplication operator out of line in the focus-object unit, with a declaration-only form in iplMathTypes.h under IPL_FOCUS_OBJECT_CPP
  • Adds a scPaneName_B_Stop symbol and uses it in optout_button_event::onEventDerived instead of an inline string literal

Macroscope summarized f48da1b.

Following #808. This intentionally changes two shared headers; all 1,027 native objects were rebuilt and audited. ## Three linking blockers fixed 1. Define the existing shared scPaneName_B_Stop string in its owning focus-object unit and use it there, preserving all 176 .sdata bytes. The linked Button unit already references this symbol; flag-only linking failed undefined-symbol resolution. No new section attribute or storage padding. 2. Move the unchanged scroller::calc body out of the header to its original end-of-unit position (8139BC14, 128 bytes). Remove the old never_inline /*for now*/ attribute. This also removes one redundant 128-byte weak copy from iplSDMemory; every owned function and match there is preserved. 3. Declare the existing VEC3 float multiply in this TU and define its unchanged inline body after cmn_calc, so the 28-byte conversion constructor precedes the 32-byte multiply as in the original. Other TUs retain the existing in-class definition, following the header's established per-TU definition-placement pattern. No algorithm, compiler option, symbol/split metadata, vtable padding, or retail assembly changes. ## Verification after rebase on 7be7f1594ed5c12a2eddaabec47369ee814ccc46 - FocusObject: 89/89 exact-name objdiff functions, 20,332/20,332 code and 2,576/2,576 data exact, now fully linked. - +20,332 linked code, +2,576 linked data, +1 completed unit. No new matching attribution claimed. - Full 43U all_source/progress/report/ok and clean source rebuild pass; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. Fresh fetch confirms tested base is origin/main. - Raw instruction audit: 88 functions have zero differences. make_gui_mgr has only two symbolic-relocation representation differences for the deduplicated PaneManager weak vtable (named global vs local .data+2016); linked DOL is byte-exact. scroller::calc is 32/32 instructions, zero differences. - Pool identical 80/80; literal audit 89 functions, 77 arguments, no candidates/errors/skips. Link-address audit zero differences. - All 1,027 objects audited: only FocusObject .text ordering and SDMemory .text removal of the redundant weak scroller::calc differ. All allocated data bytes/relocations unchanged; all other objects unchanged. No unit-code/data/function or previously exact-function regressions. - Tests: workflow 8, literal 36, jump-table 27, pool 8 pass. Diff/worktree checks pass. - Published tree 76c02915e77050a7b7bff6bc8f8ac0594b7052b0 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] > ### Restore focus-object layout and enable native linking > Restores the original build layout for the focus-object code so it can be linked natively. > - Marks `iplFocusObject.cpp` as Matching instead of Equivalent in [configure.py](https://github.com/coah80/wii-ipl/pull/814/files#diff-4d5f3192809ec1b9add6b33007e0c50031ad9a0a2f3f55a481b506468824db2c) > - Moves `scroller::calc` out of [iplFocusObject.h](https://github.com/coah80/wii-ipl/pull/814/files#diff-147268326b7b5c8c60edda069104b9dcf36210c0220648389e30369bd049b6df) into [iplFocusObject.cpp](https://github.com/coah80/wii-ipl/pull/814/files#diff-1aec726dc082d221ea0220b58c6401c9307f2160949a7c6a95fbdcb8c1e0fcca), guarded by the `IPL_FOCUS_OBJECT_CPP` define > - Defines the `VEC3` f32 scalar-multiplication operator out of line in the focus-object unit, with a declaration-only form in [iplMathTypes.h](https://github.com/coah80/wii-ipl/pull/814/files#diff-a61feea30342cf54be5851ba4240493059aac285eee8790585f2894effabdc9c) under `IPL_FOCUS_OBJECT_CPP` > - Adds a `scPaneName_B_Stop` symbol and uses it in `optout_button_event::onEventDerived` instead of an inline string literal > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized f48da1b.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-02 11:40:55 +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.