Skip to content

Commit

Permalink
Fix align in code segments (#267)
Browse files Browse the repository at this point in the history
* Don't ignore user declared align for code segments

* version bump
  • Loading branch information
AngheloAlf authored Aug 16, 2023
1 parent bf2e406 commit 447aadd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# splat Release Notes

### 0.16.8

* Avoid ignoring the `align` defined in a segment for `code` segments

### 0.16.7

* Use `pylibyaml` to speed-up yaml parsing
Expand Down
7 changes: 5 additions & 2 deletions segtypes/common/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from util.symbols import Symbol

from segtypes.common.group import CommonSegGroup
from segtypes.segment import Segment
from segtypes.segment import Segment, parse_segment_align

CODE_TYPES = ["c", "asm", "hasm"]

Expand Down Expand Up @@ -44,7 +44,10 @@ def __init__(
self.jtbl_glabels_to_add: Set[int] = set()
self.jumptables: Dict[int, Tuple[int, int]] = {}
self.rodata_syms: Dict[int, List[Symbol]] = {}
self.align = 0x10

self.align = parse_segment_align(yaml)
if self.align is None:
self.align = 0x10

@property
def needs_symbols(self) -> bool:
Expand Down
2 changes: 1 addition & 1 deletion split.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from segtypes.segment import Segment
from util import log, options, palettes, symbols, relocs

VERSION = "0.16.7"
VERSION = "0.16.8"

parser = argparse.ArgumentParser(
description="Split a rom given a rom, a config, and output directory"
Expand Down

0 comments on commit 447aadd

Please sign in to comment.