Expose spimdisasm pad creation options#540
Conversation
Co-authored-by: dreamingmoths <252494949+dreamingmoths@users.noreply.github.com> Co-authored-by: Mc-muffin <8714476+Mc-muffin@users.noreply.github.com>
|
Small correction to the BSS example in the PR description: the intended behavior is not to fold the padding into the previous BSS symbol's Before, with the autogenerated pad label: Current behavior with So the dummy |
|
Since this uses a feature from a newer spimdisasm version then you need to bump that version in a few places. Would be also nice to mention the new changes in the changelog too |
Co-authored-by: dreamingmoths <252494949+dreamingmoths@users.noreply.github.com> Co-authored-by: Mc-muffin <8714476+Mc-muffin@users.noreply.github.com>
|
Done. I left the changelog entries under the current top section for now since I’m not sure whether this will be released as 0.40.2, 0.41.0, or something else. Happy to move them if there’s a preferred version section. |
| * Add options `create_data_pads`, `create_rodata_pads` and `create_bss_pads` for controlling spimdisasm autogenerated data, rodata, and BSS/SBSS pad symbols. | ||
| * `spimdisasm` 1.41.0 or above is now required. |
There was a problem hiding this comment.
this should go above the current version, to avoid forgetting to move it while version bumping.
btw, this probably will be 0.41.0 since it adds new features/options
There was a problem hiding this comment.
Updated. I moved the changelog entries to a new 0.41.0 section. Thanks!
Summary
GlobalConfig.Thanks to @dreamingmoths and @Mc-muffin for the help.
Context
Spimdisasm exposes options for controlling autogenerated pad symbols:
This PR exposes those options through splat config as:
This lets projects control whether generated data, rodata, and BSS/SBSS output includes dummy unreferenced pad symbols.
For example, disabling BSS pad creation can fold gaps into the preceding BSS symbol instead of emitting an extra autogenerated pad label:
Instead of:
Notes
create_bss_padsdepends on the companion SpimdisasmCREATE_BSS_PADSoption.Testing
create_data_pads,create_rodata_pads, andcreate_bss_padsmap to the corresponding SpimdisasmGlobalConfigvalues.PYTHONPATH=src python test.py.PYTHONPATH=src python test_n64_entrypoints.py.