Skip to content

Allow bss_size for bss subsegments#541

Merged
ethteck merged 3 commits into
ethteck:mainfrom
AngheloAlf:specify_bss_size_for_bss
Jun 2, 2026
Merged

Allow bss_size for bss subsegments#541
ethteck merged 3 commits into
ethteck:mainfrom
AngheloAlf:specify_bss_size_for_bss

Conversation

@AngheloAlf
Copy link
Copy Markdown
Collaborator

I was trying to run splat on a very outdated project and got an error here, because splat can't figure out the size for this bss section.

      - { start: 0x50E0, type: bss, vram: 0x800044E0 }
      - [0x50E0, lib, libultra_rom_boot, initialize, .bss]

splat tries to calculate the vram address for a segment by subtracting its vram to the vram of the next segment.
In this case, the next segment doesn't have a vram address, so splat choked with an assert.

With this PR it is possible to specify a bss_size for this specific bss subsegment, getting rid of the issue.

      - { start: 0x50E0, type: bss, vram: 0x800044E0, bss_size: 0x2A70 }
      - [0x50E0, lib, libultra_rom_boot, initialize, .bss]

This should be used as a last resort tho, because this attribute can get outdated pretty quickly when doing more file splits, so I added a check to ensure is not possible to use this if the size can actually be inferred.

@ethteck ethteck merged commit 156a182 into ethteck:main Jun 2, 2026
29 checks passed
@AngheloAlf AngheloAlf deleted the specify_bss_size_for_bss branch June 2, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants