Files
BFM-decomp/docs
Drew T ee2963514a fix(tools): jtbl_rodata_pads measured a .s rodata span without its trailing .align
`_s_rodata_span` summed only the DATA an included `.s` emits, so a file ending `.asciz "r"` +
`.align 2` measured 0x801A00D8..DA instead of ..DC. The island walk then landed 2 bytes short and
`--derive` aborted with `C table entry 0 at 0x801A00DA ... island layout drift` — a true statement
about a span that was never the real one. Worse, the Makefile pipes md_*/main through `--derive`
without `set -o pipefail`, so the failure could yield a short object rather than stopping the build.

Three lines: round `hi` up to the trailing align, which is what the assembler actually emits.

CONTROLS (both on UNMODIFIED sources, so this is proven byte-neutral, not argued):
  md_SC07_003  clean rm -rf + extract + build -j + check  -> BYTE-IDENTICAL 46af79a1
  gate_main --assert-baseline                              -> BASELINE GREEN 143dbb89

Found by a drafting agent (md_SC07_003/func_801A09C8) that ran its own gate reject to ground
instead of respelling its body, and proved the patch in scratch first: with the fix its draft's
.rodata is byte-identical to the green control and .text differs in exactly 1 of 6266 words — a
%lo(jtbl) carrying a section-symbol reloc that three already-green C-jtbl functions in the same
object already ship. Cookbook §436-C, with the habit that found it.
2026-09-02 19:04:41 -06:00
..
2026-09-02 16:45:33 -06:00