fix(chans): declare HMAC helpers with external linkage #1028

Merged
coah80 merged 1 commits from agent/bittle/chans-hmac-review into main 2026-10-03 02:55:23 +00:00
coah80 commented 2026-10-03 02:53:59 +00:00 (Migrated from github.com)

Source declaration correction

CHANSVm incorrectly declares NETGetSHA1Interface and NETHMACInit/Update/GetDigest as static without definitions in the translation unit. Declare them extern, matching the actual external implementations and original object bindings. No context storage, prototype-width, header or linking-configuration changes.

Independent parent verification

  • Exactly four imports change from STB_LOCAL/SHN_UNDEF to STB_GLOBAL/SHN_UNDEF, matching original; all other symbol records unchanged
  • All allocated code/data bytes, extents and alignments and all 2010 relocation sites/types/target identities/addends unchanged. Whole-object identity is deliberately not claimed because bindings change
  • Four MWCC10532 warnings disappear in the owned source build
  • Eight HMAC/SHA1 call destinations independently checked against raw DOL, plus 392 nonrelocated original instruction words
  • All 222 exact CHANS function streams still match original; 38136 exact code bytes and data6904 preserved
  • Complete 1027-unit report unchanged; full 43U all_source/report/progress/DOL and worktree/diff checks pass
  • Pool125 and literal40 checks remain unchanged with identical allocated payloads/relocations

Existing opaque caller context reserves 0xD0 bytes; exact callee layout uses0xC0. Storage is untouched. Opaque/named struct declarations remain separate, so this fixes external linkage only, not complete shared-prototype compatibility. No decompilation percentage gain claimed.

Base: ce2130f867
Tested tree: 9edcb7a3fd
DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d

No merge performed or requested by this author.

Note

Fix CHANSVm HMAC helpers to use external linkage

Changes the four SHA1/HMAC helper declarations in CHANSVm.c from file-local static to external linkage. Signatures, parameter types, and opaque context size are unchanged. Adds a validation report in CHANSVm-hmac-linkage-20261003.md covering the source/binary mismatch evidence, ABI details, and build comparisons.

Macroscope summarized 03ac61f.

## Source declaration correction CHANSVm incorrectly declares NETGetSHA1Interface and NETHMACInit/Update/GetDigest as static without definitions in the translation unit. Declare them extern, matching the actual external implementations and original object bindings. No context storage, prototype-width, header or linking-configuration changes. ## Independent parent verification - Exactly four imports change from STB_LOCAL/SHN_UNDEF to STB_GLOBAL/SHN_UNDEF, matching original; all other symbol records unchanged - All allocated code/data bytes, extents and alignments and all 2010 relocation sites/types/target identities/addends unchanged. Whole-object identity is deliberately not claimed because bindings change - Four MWCC10532 warnings disappear in the owned source build - Eight HMAC/SHA1 call destinations independently checked against raw DOL, plus 392 nonrelocated original instruction words - All 222 exact CHANS function streams still match original; 38136 exact code bytes and data6904 preserved - Complete 1027-unit report unchanged; full 43U all_source/report/progress/DOL and worktree/diff checks pass - Pool125 and literal40 checks remain unchanged with identical allocated payloads/relocations Existing opaque caller context reserves 0xD0 bytes; exact callee layout uses0xC0. Storage is untouched. Opaque/named struct declarations remain separate, so this fixes external linkage only, not complete shared-prototype compatibility. No decompilation percentage gain claimed. Base: ce2130f8676de950cc8a5019da333815ae1f1f3f Tested tree: 9edcb7a3fd1401d6ed8d0377eb1fcf686e2f72c5 DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d No merge performed or requested by this author. <!-- 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 `CHANSVm` HMAC helpers to use external linkage > Changes the four SHA1/HMAC helper declarations in [CHANSVm.c](https://github.com/coah80/wii-ipl/pull/1028/files#diff-fcd94241dcc82f12e50e6a224211f94b32d8c83c08ab0880c20261cea99b4f75) from file-local `static` to external linkage. Signatures, parameter types, and opaque context size are unchanged. Adds a validation report in [CHANSVm-hmac-linkage-20261003.md](https://github.com/coah80/wii-ipl/pull/1028/files#diff-8c610c897069c0087aced274caa13ef934cee7410bb4904ae188cf208ce0c522) covering the source/binary mismatch evidence, ABI details, and build comparisons. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 03ac61f.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-03 02:55:21 +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.