Repository navigation
Preserve BSS ranges when N64 discovery splits a segment - #3
Merged
Merged
Conversation
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.
Summary
Preserve an explicit BSS address range when additional N64 code segments split the original parent segment's ROM-backed data.
Splat computes a parent VRAM end from its ROM length plus
bss_size. Inserting discovered segments shortens the original ROM range, which could move that computed end below its unchanged explicit BSS start and stop import. Preserve the original parent end and translate the parent extent into the actual BSS size during standalone export.Verification
ruff check src tests projectspassed.Private full-rebuild verification exposed a second export issue: startup assembly retained a known function alias after discovery named that function by address. Preserve those original symbol-file aliases in the standalone linker, without inventing addresses or relaxing the byte comparison. The export regression checks the saved alias address.
Full private cartridge verification passed after both repairs: all-assembly export (zero C selections) reproduces the complete normalized 12 MiB input byte for byte. Generated artifacts remain outside the repository.