Restore FAT directory order and link directory/volume routines #812

Merged
coah80 merged 1 commits from agent/bittle/fat-directory-volume-link into main 2026-10-02 11:34:15 +00:00
coah80 commented 2026-10-02 11:32:08 +00:00 (Migrated from github.com)

Following #808/#810: reorder unchanged FAT directory function definitions to original object order, then enable native directory and volume objects.

Why flags alone failed

A flag-only trial changed 6,722 DOL bytes. PFDIR_p_fsnext and PFDIR_p_fsfirst were emitted at the end (+6,428 bytes versus target), while fsexec_remove/chmod were reversed. This displaced 26 named functions. Moving the same four function bodies into fsnext, fsfirst, chmod, remove order restores all addresses. No function body, signature, data, metadata, compiler option, or shared header changes.

Fresh verification after rebase on ed5c96bd85

  • pf_dir: 38/38 instruction-exact functions, 18,976 code / 40 data exact and linked.
  • pf_volume: 37/37 instruction-exact functions, 17,992 code / 210,976 data exact and linked.
  • Combined +36,968 linked code, +211,016 linked data, +2 completed units. No new matching attribution claimed.
  • Full 43U all_source/progress/report/ok build passes; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d.
  • Pools identical: directory 0/0, volume 1/1. Literal audit: 75 functions, 3 arguments, no candidates/errors/skips.
  • Across all 1,027 native objects, only pf_dir .text ordering/relocation offsets change; its size stays 18,976 bytes. All other allocated sections unchanged. Global link-address audit: zero differences.
  • Tests: workflow 8, literal 36, jump-table 27, pool 8 pass. Diff/worktree checks pass.
  • Remote tree 051e2951cf equals tested local tree.

Draft for review; no merge performed.

Note

Match fa/pf_dir.c and fa/pf_volume.c and restore FAT directory order

  • Reclassifies fa/pf_dir.c and fa/pf_volume.c from NonMatching to Matching in configure.py, so builds use the matching object implementations
  • Moves PFDIR_p_fsnext and PFDIR_p_fsfirst earlier in pf_dir.c and PFDIR_p_fsexec_remove later, after PFDIR_p_fsexec_chmod; implementations are unchanged
  • Risk: configure.py library object list must keep the matching entries in sync with any future build changes

Macroscope summarized 53b5441.

Following #808/#810: reorder unchanged FAT directory function definitions to original object order, then enable native directory and volume objects. ## Why flags alone failed A flag-only trial changed 6,722 DOL bytes. PFDIR_p_fsnext and PFDIR_p_fsfirst were emitted at the end (+6,428 bytes versus target), while fsexec_remove/chmod were reversed. This displaced 26 named functions. Moving the same four function bodies into fsnext, fsfirst, chmod, remove order restores all addresses. No function body, signature, data, metadata, compiler option, or shared header changes. ## Fresh verification after rebase on ed5c96bd85c7bba8227f88c82a3cd5f06e6e95a1 - pf_dir: 38/38 instruction-exact functions, 18,976 code / 40 data exact and linked. - pf_volume: 37/37 instruction-exact functions, 17,992 code / 210,976 data exact and linked. - Combined +36,968 linked code, +211,016 linked data, +2 completed units. No new matching attribution claimed. - Full 43U all_source/progress/report/ok build passes; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. - Pools identical: directory 0/0, volume 1/1. Literal audit: 75 functions, 3 arguments, no candidates/errors/skips. - Across all 1,027 native objects, only pf_dir .text ordering/relocation offsets change; its size stays 18,976 bytes. All other allocated sections unchanged. Global link-address audit: zero differences. - Tests: workflow 8, literal 36, jump-table 27, pool 8 pass. Diff/worktree checks pass. - Remote tree 051e2951cfada91d9ad543ecb3e10f97ae877ba1 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] > ### Match `fa/pf_dir.c` and `fa/pf_volume.c` and restore FAT directory order > - Reclassifies `fa/pf_dir.c` and `fa/pf_volume.c` from NonMatching to Matching in [configure.py](https://github.com/coah80/wii-ipl/pull/812/files#diff-4d5f3192809ec1b9add6b33007e0c50031ad9a0a2f3f55a481b506468824db2c), so builds use the matching object implementations > - Moves `PFDIR_p_fsnext` and `PFDIR_p_fsfirst` earlier in [pf_dir.c](https://github.com/coah80/wii-ipl/pull/812/files#diff-ac3f3058092eda7d097ed525aa290265a5a1713da4c125179380a0bf78eaa592) and `PFDIR_p_fsexec_remove` later, after `PFDIR_p_fsexec_chmod`; implementations are unchanged > - Risk: `configure.py` library object list must keep the matching entries in sync with any future build changes > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 53b5441.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-02 11:34:12 +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.