Restore SD title button-string ownership #567

Merged
coah80 merged 1 commits from agent/bittle/sd-title-string-ownership into main 2026-10-01 22:46:44 +00:00
coah80 commented 2026-10-01 22:39:15 +00:00 (Migrated from github.com)

Ownership evidence

The .sdata tail attributed to SDChannelObj contains B_BtnA at 0x81696E30 and B_BtnB at 0x81696E37. No SDChannelObj text relocation references them. Their only incoming data references are the two entries of SDChannelTitle's button-name table at 0x81696E40; that table's consumers are in SDChannelTitle (for example 0x813E52B4 and 0x813E52FC).

Move the adjacent .sdata boundary 0x81696E40 → 0x81696E30. Replace SDChannelTitle's two external address-labelled string declarations with the ordinary literals in its existing sButtonNames initializer. The compiler naturally emits both strings, alignment and pointer table in the original order. No symbol address/size changes, invented padding or weak-vtable edits.

This was the concrete additional ownership error found in a broader audit of 714 relocated data blocks; external callback/language tables were excluded as legitimate cross-unit references.

Fresh verification

Rebased on e0ea5529, after the #496 caller build regression was fixed. Fresh rebuild of both owned objects, full 43U target and report against a separate current-main build.

  • SDChannelObj .sdata: 96/96 exact; unit data 1,976/2,088 → 2,072/2,072 (100%).
  • SDChannelTitle .sdata: 192/192 exact; matched data 224/1,960 → 240/1,976. Its unrelated .data/.sdata2 and code mismatches remain.
  • Independently compared emitted bytes and normalized relocations: SDObj 91-byte prefix + all 4 relocations, SDTitle 188-byte prefix + all 4 relocations identical. Remaining 5/4 bytes are existing section-end alignment, not source padding objects.
  • Both compiled .text sections are byte-for-byte unchanged from the same-base build (7,604 and 20,096 bytes including extra weak bodies). Exact-function counts remain 37/38 and 62/69. No new code matching claim.
  • Global matched data 1,687,092 → 1,687,204 (+112); total data stays 1,832,684. Code/link totals unchanged; no previously exact-function or matched-data regression across the report.
  • String pools 15/15 and 55/55 identical; workflow guards 7/7, pool tests 8/8, diff/worktree checks pass.
  • Full all_source, report and build/43U/ok pass; SHA-1 26116613f624061ba99c8d1a299aaa6efa85670d.

Both units retain their previous linking status. Left for Cole's review and merge.

Note

Restore SD title button-string ownership in iplSDChannelTitle.cpp

Moves a 0x10-byte .sdata range boundary from the iplSDChannelObj.cpp split to the adjacent iplSDChannelTitle.cpp split in splits.txt. The combined range is unchanged. Also initializes the sButtonNames table directly with the B_BtnA and B_BtnB literals, removing the external label declarations.

Macroscope summarized e44d90d.

## Ownership evidence The `.sdata` tail attributed to SDChannelObj contains **B_BtnA at 0x81696E30** and **B_BtnB at 0x81696E37**. No SDChannelObj text relocation references them. Their only incoming data references are the two entries of SDChannelTitle's button-name table at **0x81696E40**; that table's consumers are in SDChannelTitle (for example 0x813E52B4 and 0x813E52FC). Move the adjacent `.sdata` boundary **0x81696E40 → 0x81696E30**. Replace SDChannelTitle's two external address-labelled string declarations with the ordinary literals in its existing `sButtonNames` initializer. The compiler naturally emits both strings, alignment and pointer table in the original order. No symbol address/size changes, invented padding or weak-vtable edits. This was the concrete additional ownership error found in a broader audit of **714 relocated data blocks**; external callback/language tables were excluded as legitimate cross-unit references. ## Fresh verification Rebased on **e0ea5529**, after the #496 caller build regression was fixed. Fresh rebuild of both owned objects, full 43U target and report against a separate current-main build. - SDChannelObj `.sdata`: **96/96 exact**; unit data **1,976/2,088 → 2,072/2,072 (100%)**. - SDChannelTitle `.sdata`: **192/192 exact**; matched data **224/1,960 → 240/1,976**. Its unrelated `.data`/`.sdata2` and code mismatches remain. - Independently compared emitted bytes and normalized relocations: SDObj **91-byte prefix + all 4 relocations**, SDTitle **188-byte prefix + all 4 relocations** identical. Remaining 5/4 bytes are existing section-end alignment, not source padding objects. - Both compiled `.text` sections are **byte-for-byte unchanged** from the same-base build (7,604 and 20,096 bytes including extra weak bodies). Exact-function counts remain **37/38** and **62/69**. No new code matching claim. - Global matched data **1,687,092 → 1,687,204** (+112); total data stays **1,832,684**. Code/link totals unchanged; no previously exact-function or matched-data regression across the report. - String pools **15/15** and **55/55** identical; workflow guards **7/7**, pool tests **8/8**, diff/worktree checks pass. - Full `all_source`, report and `build/43U/ok` pass; SHA-1 **26116613f624061ba99c8d1a299aaa6efa85670d**. Both units retain their previous linking status. Left for Cole's review and merge. <!-- 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 SD title button-string ownership in `iplSDChannelTitle.cpp` > Moves a 0x10-byte `.sdata` range boundary from the `iplSDChannelObj.cpp` split to the adjacent `iplSDChannelTitle.cpp` split in [splits.txt](https://github.com/coah80/wii-ipl/pull/567/files#diff-d5132efbf4d83cc6fc61c89e9d57150d270f1361827760236aeab4e594f19366). The combined range is unchanged. Also initializes the `sButtonNames` table directly with the `B_BtnA` and `B_BtnB` literals, removing the external label declarations. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized e44d90d.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-01 22:46:41 +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.