Consistently do & alignMask, not % alignSize

Also add more unrelated tests for coverage
This commit is contained in:
Rangi42
2025-09-23 11:53:05 -04:00
parent 96a75500d3
commit ca4b890273
10 changed files with 98 additions and 38 deletions

View File

@@ -0,0 +1,10 @@
IF !DEF(SECOND)
def ATTRS equs ",ALIGN[2]"
ELSE
def ATTRS equs "[$1337]"
ENDC
SECTION FRAGMENT "conflicting alignment", ROM0 {ATTRS}
db
PURGE ATTRS

View File

@@ -0,0 +1,10 @@
FATAL: Section "conflicting alignment" is defined with 4-byte alignment (offset 0), but also with address $1337
at section-fragment/align-conflict.asm(7)
and also:
at section-fragment/align-conflict.asm(7)
Linking aborted with 1 error
---
error: Section already declared as aligned to 4 bytes (offset 0)
at <stdin>(18)
FATAL: Cannot create section "conflicting alignment" (1 error)
at <stdin>(18)