mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-24 03:52:08 +00:00
Improve linker script align (#1271)
An offset is now supported, and invalid values are no longer silently truncated, aligning behaviour with other instances of the directive.
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
error: ./section-attributes-mismatch.link(3): The linker script assigns section "sec" to address $0018, but that would be ALIGN[4, 8] instead of the requested ALIGN[4, 0]
|
||||
error: ./section-attributes-mismatch.link(3): The linker script assigns section "sec" to address $0018, but that would be ALIGN[4, 8] instead of the requested ALIGN[4, 2]
|
||||
Linking failed with 1 error
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
SECTION "sec",ROM0,ALIGN[4]
|
||||
ds 8, $42
|
||||
SECTION "sec",ROM0,ALIGN[4,2]
|
||||
ds 6, $42
|
||||
SECTION "secfix",ROM0[$20]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
ROM0
|
||||
align 4
|
||||
align 4, 2
|
||||
"sec"
|
||||
ds $18
|
||||
org $20
|
||||
align 5
|
||||
"secfix"
|
||||
|
||||
Reference in New Issue
Block a user