Repository navigation
coff split: let splits.txt mark units the linker writes - #13
Merged
Merged
Conversation
A unit marked `linker` in splits.txt covers a region the linker emits itself (an import or export table, a debug directory). The split still writes its object, from the original's bytes, but: - objs.rsp leaves it out of the link; - the build config marks it `linker: true` and lists the image ranges its sections cover, so a build system can hold it back and compare the linked image against the original there; - the gap after it doesn't inherit its sub-section name: what follows belongs to the parent section, not to the table; - a module with generate_imports or generate_exports fails the split if any `.idata`/`.edata` split is outside a `linker` unit, instead of linking the original table a second time. The attribute is written back on split.
This was referenced Oct 11, 2026
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.
A unit marked
linkerin splits.txt covers a region the linker emits itself (an import or export table, a debug directory). bw1-decomp used to hold these back by naming dtk's address-derivedauto_…units in its configure.py; now splits.txt says so directly.objs.rspleaves it out of the link."linker": trueand lists the imagerangesits sections cover.linkerunit no longer inherits its sub-section name (.idata$5); what follows belongs to the parent section. Other carry-forwards (.text$x,.CRT$XTZtail padding) are unchanged.generate_imports/generate_exportsfails the split if an.idata/.edatasplit is outside alinkerunit, rather than linking the original table a second time.Verified on bw1-decomp BW1W120 (branch
linker-units): all 15 hashes match, and link order and every other unit name are identical to v0.0.35.cargo testpasses, with a new parser test.🤖 Generated with Claude Code