dat: show inferred symbols in objdiff, add directories - #3597
Merged
Merged
Conversation
ribbanya
marked this pull request as ready for review
October 1, 2026 03:53
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 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.