<feed xmlns='http://www.w3.org/2005/Atom'>
<title>botw/tools/count_misordered_functions.py, branch master</title>
<subtitle>Decompilation of The Legend of Zelda: Breath of the Wild (Switch v1.5.0)</subtitle>
<link rel='alternate' type='text/html' href='https://git.dog6.net/botw/'/>
<entry>
<title>tools: leave library code and weak copies out of the order check</title>
<updated>2026-10-18T17:12:09+00:00</updated>
<author>
<name>Léo Lam</name>
<email>leo@leolam.fr</email>
</author>
<published>2026-10-18T17:12:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/botw/commit/?id=c9cef4a09f42c53aabe1f7ad09e380d424e4aff0'/>
<id>c9cef4a09f42c53aabe1f7ad09e380d424e4aff0</id>
<content type='text'>
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)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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)
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: collapse renames in the order comparison</title>
<updated>2026-10-13T00:31:34+00:00</updated>
<author>
<name>Léo Lam</name>
<email>leo@leolam.fr</email>
</author>
<published>2026-10-13T00:31:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/botw/commit/?id=790a1a311d3865c70916a36ba36be762e2a96572'/>
<id>790a1a311d3865c70916a36ba36be762e2a96572</id>
<content type='text'>
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)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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)
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: add a script that measures object and function order</title>
<updated>2026-10-12T23:31:08+00:00</updated>
<author>
<name>Léo Lam</name>
<email>leo@leolam.fr</email>
</author>
<published>2026-10-12T23:25:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/botw/commit/?id=4bd1d8782b0dc01d5a3e82ec6e8093221fc81113'/>
<id>4bd1d8782b0dc01d5a3e82ec6e8093221fc81113</id>
<content type='text'>
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)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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)
</pre>
</div>
</content>
</entry>
</feed>
