Restore hardware-keyboard function order and link unit #698

Merged
coah80 merged 1 commits from agent/bittle/hardware-link-check into main 2026-10-02 00:29:25 +00:00
coah80 commented 2026-10-02 00:28:35 +00:00 (Migrated from github.com)

Reorder the existing HWKeyboard definitions to their original object order, then mark the unit Matching. A flag-only trial failed the DOL hash with 4,063 differing bytes; restoring the order makes the entire DOL byte-identical.

All ten function bodies are unchanged (verified by extracting and comparing each complete definition). Existing inline assembly is only moved, never added or substituted for C/C++. No shared headers or symbol/split metadata changes.

Verification on a81b7c36

  • Exact-name objdiff: 10/10 functions, 4,596/4,596 code bytes, 100%
  • Full all_source/progress/report/ok passes; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d
  • Linked code +4,596; linked data +504; complete units 920 → 921
  • .data 288/288 bytes and all 70 relocations exact; .rodata 176/176; .sdata2 16/16 raw bytes exact; .sdata source 3-byte prefix exact with five existing alignment zeros in reference
  • Pool comparison: identical (0 strings)
  • ctxdiff: 8 functions have zero differences. The other two retain 6 and 5 symbol-representation differences: source-defined STB_WEAK LayoutGather singleton/guard at .sbss+4/+0 versus the same named undefined reference symbols. Instruction counts match (40/40, 97/97); the final linked DOL resolves them exactly. Local pyelftools/Capstone adapter disclosed, no suppression of these results
  • Workflow tests 7/7, pool tests 8/8, jump-table tests 20/20, diff and worktree checks pass

Data scoring remains 472/504 (93.650795%) despite exact owned raw initialized-data bytes and final DOL. This PR does not modify symbol extents, insert padding, or claim a data-score gain. Global completeness gate still correctly fails; the project is not complete. Remote tree f280a52d81 equals the tested local tree. Left for Cole's review and merge.

Note

Reorder hardware-keyboard source and mark tiHwKeyboard.cpp as Matching

Reorders declarations and definitions in tiHwKeyboard.cpp — the HWKeyboard constructor, init, updateShift, and the NavigationCommand/KeyInputData declarations now appear before the input-update assembly routine, and setLanguage moves after convertWCCode. All function bodies, types, and layouts are unchanged. Marks the keyboard source entry as Matching in configure.py, keeping the same source path and compiler flags.

Macroscope summarized 6bc5b4c.

## Link exact existing code in original order Reorder the existing HWKeyboard definitions to their original object order, then mark the unit Matching. A flag-only trial failed the DOL hash with 4,063 differing bytes; restoring the order makes the entire DOL byte-identical. All ten function bodies are unchanged (verified by extracting and comparing each complete definition). Existing inline assembly is only moved, never added or substituted for C/C++. No shared headers or symbol/split metadata changes. ## Verification on a81b7c36 - Exact-name objdiff: 10/10 functions, 4,596/4,596 code bytes, 100% - Full all_source/progress/report/ok passes; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d - Linked code +4,596; linked data +504; complete units 920 → 921 - .data 288/288 bytes and all 70 relocations exact; .rodata 176/176; .sdata2 16/16 raw bytes exact; .sdata source 3-byte prefix exact with five existing alignment zeros in reference - Pool comparison: identical (0 strings) - ctxdiff: 8 functions have zero differences. The other two retain 6 and 5 symbol-representation differences: source-defined STB_WEAK LayoutGather singleton/guard at .sbss+4/+0 versus the same named undefined reference symbols. Instruction counts match (40/40, 97/97); the final linked DOL resolves them exactly. Local pyelftools/Capstone adapter disclosed, no suppression of these results - Workflow tests 7/7, pool tests 8/8, jump-table tests 20/20, diff and worktree checks pass Data scoring remains 472/504 (93.650795%) despite exact owned raw initialized-data bytes and final DOL. This PR does not modify symbol extents, insert padding, or claim a data-score gain. Global completeness gate still correctly fails; the project is not complete. Remote tree f280a52d8162e5e0272a5714eab463e6e0df4e5c equals the tested local tree. 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] > ### Reorder hardware-keyboard source and mark `tiHwKeyboard.cpp` as Matching > Reorders declarations and definitions in [tiHwKeyboard.cpp](https://github.com/coah80/wii-ipl/pull/698/files#diff-8cb43f83ff067681621db42405d3d111f67a100a45a59f5de0c354bbb8857879) — the `HWKeyboard` constructor, `init`, `updateShift`, and the `NavigationCommand`/`KeyInputData` declarations now appear before the input-update assembly routine, and `setLanguage` moves after `convertWCCode`. All function bodies, types, and layouts are unchanged. Marks the keyboard source entry as Matching in [configure.py](https://github.com/coah80/wii-ipl/pull/698/files#diff-4d5f3192809ec1b9add6b33007e0c50031ad9a0a2f3f55a481b506468824db2c), keeping the same source path and compiler flags. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 6bc5b4c.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-02 00:29:23 +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.