mirror of
https://github.com/doldecomp/melee.git
synced 2026-11-10 01:51:41 -10:00
Units are grouped by module, the first two letters of the archive's name: every build directory holds <module>/<archive> (Pl/PlMr), and objdiff names them dat/Pl/PlMr, like the code's main/. The target objects held only the samples, so units showed every symbol matching while not complete. Now they hold the whole archive in two sections, which objdiff lists by name: - .0.sampled: the sampled objects, with pointers as relocations - .1.inferred: the archive's other global symbols (its publics, and the data the samples point to), uninitialized, so objdiff never diffs their bytes The base defines the globals the walk explains in its own .1.inferred (target/<unit>.rest.o, linked with the C), so objdiff pairs them by name and matches them by size; the rest show as missing. A global is explained when it and everything it reaches before another global or a sample is typed data with no unexplained relocation. Each target symbol's offset in the archive is its virtual address in a .note.split, as decomp-toolkit writes for split code, which objdiff shows. objdiff takes section kinds from their ELF type, so the names are free; the numbers set the order. Raw u8 data says nothing of its format, so it isn't explained. DAT_BLOB on a u8 typedef names one: HSD_FObjData, the keyframe streams of HSD_FObjDesc and FigaTrack, sized by DAT_COUNT(length). DAT_TERMINATED compares elements smaller than a word whole (FigaTree.nodes, up to -1). The walk records how far each object's typed data reaches, so counted and DAT_EXTENT arrays count whole. Generated C declares untyped data as UNK_T instead of a DatBlob array. --------- Co-authored-by: Claude Opus 5.5 <[email protected]>