Honor alignment offset for ALIGN[16, N]

The *one* place where it was missed...
This commit is contained in:
ISSOtm
2024-02-18 22:23:45 +01:00
committed by Sylvie
parent b100c8ebee
commit 36dad4380e
5 changed files with 8 additions and 1 deletions

View File

@@ -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
View 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
View File

@@ -0,0 +1,4 @@
ROM0
org 3
align 16,3
"test"

0
test/link/align16.out Normal file
View File

BIN
test/link/align16.out.bin Normal file

Binary file not shown.