mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Honor alignment offset for ALIGN[16, N]
The *one* place where it was missed...
This commit is contained in:
@@ -355,7 +355,7 @@ static struct Section *getSection(char const *name, enum SectionType type, uint3
|
||||
} else if (alignment == 16) {
|
||||
// Treat an alignment of 16 as being fixed at address 0
|
||||
alignment = 0;
|
||||
org = 0;
|
||||
org = alignOffset;
|
||||
// The address is known to be valid, since the alignment is
|
||||
}
|
||||
}
|
||||
|
||||
3
test/link/align16.asm
Normal file
3
test/link/align16.asm
Normal file
@@ -0,0 +1,3 @@
|
||||
SECTION "test", ROM0, ALIGN[16, 3]
|
||||
align 16, 3
|
||||
db 1, 2, 3
|
||||
4
test/link/align16.link
Normal file
4
test/link/align16.link
Normal file
@@ -0,0 +1,4 @@
|
||||
ROM0
|
||||
org 3
|
||||
align 16,3
|
||||
"test"
|
||||
0
test/link/align16.out
Normal file
0
test/link/align16.out
Normal file
BIN
test/link/align16.out.bin
Normal file
BIN
test/link/align16.out.bin
Normal file
Binary file not shown.
Reference in New Issue
Block a user