Correct L2CAP diagnostic string ownership #696

Merged
coah80 merged 1 commits from agent/bittle/l2cap-data-boundary into main 2026-10-02 00:35:43 +00:00
coah80 commented 2026-10-02 00:21:57 +00:00 (Migrated from github.com)

Relocation-backed boundary correction

Move the l2c_link/l2c_main .data boundary from 0x8168EB68 to 0x8168EBA0. The 50-byte diagnostic string at 0x8168EB68 (L2CAP - rcvd segment complete, unknown handle: %d) is referenced by l2c_link_segments_xmitted, with HA/LO relocations at function +0x62/+0x6E. It is the final compiler-emitted string in l2c_link, rather than the first data of l2c_main. The 56-byte interval includes existing alignment bytes.

After correction:

  • l2c_link source .data: 618 bytes identical to the 624-byte reference prefix, followed by six existing alignment zeros; string pool 14/14
  • l2c_main source .data: 763 bytes identical to the 768-byte reference prefix, followed by five existing alignment zeros; all 12 relocations exact; string pool 18/18
  • l2c_link_segments_xmitted: 55/55 instructions, ctxdiff 0
  • Both units retain 100% code: 17/17 and 5/5 functions
  • l2c_link matched data 568/568 → 624/624; l2c_main 2024/2848 → 2792/2792 (100%)
  • Aggregate matched data +824 bytes from corrected ownership/re-attribution, with no total-data change

Verification

Rebased and fully rebuilt on a81b7c36fe. Only two adjacent boundaries in config/43U/splits.txt change; symbol addresses/sizes and C/C++ sources are untouched. All affected source .text bytes remain identical. Full 43U all_source/progress/report/ok passes; DOL SHA1 is 26116613f624061ba99c8d1a299aaa6efa85670d. Workflow guards 7/7, pool tests 8/8, jump-table tests 20/20; worktree checks pass. ctxdiff uses the disclosed local pyelftools/Capstone compatibility adapter. No new padding, assembly or weak-vtable changes. No code/link percentage gain claimed; affected units were already linked. Left for Cole's review and merge.

Note

Fix l2c_link.c data section boundary in 43U split layout

Grows the .data section range for libs/RVL_SDK/src/bte/l2c_link.c by 0x38 bytes, ending at 0x8168EBA0 instead of 0x8168EB68. Moves the start of the l2c_main.c data section by the same amount in splits.txt. Risk: if the actual .data size of l2c_link.c does not match the new boundary, the 43U build split layout will be misaligned.

Macroscope summarized 00d2711.

## Relocation-backed boundary correction Move the l2c_link/l2c_main .data boundary from 0x8168EB68 to 0x8168EBA0. The 50-byte diagnostic string at 0x8168EB68 (`L2CAP - rcvd segment complete, unknown handle: %d`) is referenced by l2c_link_segments_xmitted, with HA/LO relocations at function +0x62/+0x6E. It is the final compiler-emitted string in l2c_link, rather than the first data of l2c_main. The 56-byte interval includes existing alignment bytes. After correction: - l2c_link source .data: 618 bytes identical to the 624-byte reference prefix, followed by six existing alignment zeros; string pool 14/14 - l2c_main source .data: 763 bytes identical to the 768-byte reference prefix, followed by five existing alignment zeros; all 12 relocations exact; string pool 18/18 - l2c_link_segments_xmitted: 55/55 instructions, ctxdiff 0 - Both units retain 100% code: 17/17 and 5/5 functions - l2c_link matched data 568/568 → 624/624; l2c_main 2024/2848 → 2792/2792 (100%) - Aggregate matched data +824 bytes from corrected ownership/re-attribution, with no total-data change ## Verification Rebased and fully rebuilt on a81b7c36fe25993fac3ad2a3009f16839aed40ec. Only two adjacent boundaries in config/43U/splits.txt change; symbol addresses/sizes and C/C++ sources are untouched. All affected source .text bytes remain identical. Full 43U all_source/progress/report/ok passes; DOL SHA1 is 26116613f624061ba99c8d1a299aaa6efa85670d. Workflow guards 7/7, pool tests 8/8, jump-table tests 20/20; worktree checks pass. ctxdiff uses the disclosed local pyelftools/Capstone compatibility adapter. No new padding, assembly or weak-vtable changes. No code/link percentage gain claimed; affected units were already linked. 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] > ### Fix `l2c_link.c` data section boundary in 43U split layout > Grows the `.data` section range for `libs/RVL_SDK/src/bte/l2c_link.c` by 0x38 bytes, ending at 0x8168EBA0 instead of 0x8168EB68. Moves the start of the `l2c_main.c` data section by the same amount in [splits.txt](https://github.com/coah80/wii-ipl/pull/696/files#diff-d5132efbf4d83cc6fc61c89e9d57150d270f1361827760236aeab4e594f19366). Risk: if the actual `.data` size of `l2c_link.c` does not match the new boundary, the 43U build split layout will be misaligned. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 00d2711.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-02 00:32:10 +00:00 (Migrated from github.com)

Rebased the unchanged boundary correction onto 7a24a5c1 after #698. Fresh all_source/progress/report/ok passes and the DOL SHA1 remains 26116613f624061ba99c8d1a299aaa6efa85670d. Tested local tree 6683e0f429 equals the new remote tree. Head 00d2711a14.

Rebased the unchanged boundary correction onto 7a24a5c1 after #698. Fresh all_source/progress/report/ok passes and the DOL SHA1 remains 26116613f624061ba99c8d1a299aaa6efa85670d. Tested local tree 6683e0f4291de4a14e554584e6f73c2951c2db7f equals the new remote tree. Head 00d2711a14659a5a54eaafab41494a0e0854ae1e.
coah80 commented 2026-10-02 00:35:40 +00:00 (Migrated from github.com)

Reviewed and merged: relocation-backed split boundary correction, splits.txt only. The gate's complete_data drop is the bytes moving to the adjacent unit (total unchanged, both units' matched data now 100%). Full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d. Good evidence.

Reviewed and merged: relocation-backed split boundary correction, splits.txt only. The gate's complete_data drop is the bytes moving to the adjacent unit (total unchanged, both units' matched data now 100%). Full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d. Good evidence.
Sign in to join this conversation.