diff --git a/CHANGELOG.md b/CHANGELOG.md index e137fb85..7223283e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # splat Release Notes +### 0.17.4 + +* New yaml option: `ld_bss_is_noload` + * Allows to control if `bss` sections (and derivatived sections) will be put on a `NOLOAD` segment on the generated linker script or not. + * Applies to all `bss` (`sbss`, `common`, `scommon`, etc) sections. + * Defaults to `True`, meaning `bss` sections will be put on `NOLOAD` segments. + ### 0.17.3 * Move wiki to the `docs` folder diff --git a/docs/Configuration.md b/docs/Configuration.md index 611f278e..1c420e5e 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -392,6 +392,15 @@ Possible values: Specifies the starting offset for rom address symbols in the linker script. +### ld_bss_is_noload + +Allows to control if `bss` sections (and derivatived sections) will be put on a `NOLOAD` segment on the generated linker script or not. + +Applies to all `bss` (`sbss`, `common`, `scommon`, etc) sections. + +Defaults to `True`, meaning `bss` sections will be put on `NOLOAD` segments. + + ## C file options ### create_c_files diff --git a/split.py b/split.py index 36cb5cd9..76ea637f 100755 --- a/split.py +++ b/split.py @@ -25,7 +25,7 @@ from segtypes.segment import Segment from util import log, options, palettes, symbols, relocs -VERSION = "0.17.3" +VERSION = "0.17.4" parser = argparse.ArgumentParser( description="Split a rom given a rom, a config, and output directory" diff --git a/util/options.py b/util/options.py index 0e683b5b..e3fe6bd5 100644 --- a/util/options.py +++ b/util/options.py @@ -124,6 +124,8 @@ class SplatOpts: segment_symbols_style: str # Specifies the starting offset for rom address symbols in the linker script. ld_rom_start: int + # Allows to control if `bss` sections (and derivatived sections) will be put on a `NOLOAD` segment on the generated linker script or not. + ld_bss_is_noload: bool ################################################################################ # C file options @@ -413,6 +415,7 @@ def parse_endianness() -> Literal["big", "little"]: "segment_symbols_style", str, ["splat", "makerom"], "splat" ), ld_rom_start=p.parse_opt("ld_rom_start", int, 0), + ld_bss_is_noload=p.parse_opt("ld_bss_is_noload", bool, True), create_c_files=p.parse_opt("create_c_files", bool, True), auto_decompile_empty_functions=p.parse_opt( "auto_decompile_empty_functions", bool, True