Commit Graph

3 Commits

Author SHA1 Message Date
Léo Lam c9cef4a09f tools: leave library code and weak copies out of the order check
The decomp links all libraries before the game code, whereas the
original interleaves them with it, so every library object counted as
misordered (156 of 157) and each newly bound library row added one.

A weak function's copy in the original comes from whichever object the
linker saw first, so it says nothing about where its decomp object
belongs: 172 of 248 strays were weak copies. Weak functions now only
count for order within their object's main block.

(AI assisted using Claude Opus 5.5)
2026-10-18 20:12:09 +03:00
Léo Lam 790a1a311d tools: collapse renames in the order comparison
Renaming or moving a file printed every still-misordered entry it touched
as a -/+ pair, burying the real changes. Entries are now keyed by original
address: ones only renamed are counted instead of listed, and the rest are
sorted by address.

(AI assisted using Claude Opus 5.5)
2026-10-13 02:31:34 +02:00
Léo Lam 4bd1d8782b tools: add a script that measures object and function order
The decomp binary should ideally be laying out objects and functions in
the same order as the original executable (as much as possible). Add a
script that a) reports misordered objects, functions that appear to be
implemented in the wrong TU and misordered functions within objects,
and b) can compare against a saved baseline so CI can fail PRs that
make the order worse.

(AI assisted using Claude Opus 5.5)
2026-10-13 01:31:08 +02:00