mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Report error when aligning outside of a section
This commit is contained in:
@@ -378,6 +378,7 @@ uint32_t sect_GetOutputOffset(void)
|
||||
|
||||
void sect_AlignPC(uint8_t alignment, uint16_t offset)
|
||||
{
|
||||
checksection();
|
||||
struct Section *sect = sect_GetSymbolSection();
|
||||
|
||||
if (sect->org != -1) {
|
||||
|
||||
1
test/asm/align-pc-outside-section.asm
Normal file
1
test/asm/align-pc-outside-section.asm
Normal file
@@ -0,0 +1 @@
|
||||
align 1
|
||||
2
test/asm/align-pc-outside-section.err
Normal file
2
test/asm/align-pc-outside-section.err
Normal file
@@ -0,0 +1,2 @@
|
||||
FATAL: align-pc-outside-section.asm(1):
|
||||
Code generation before SECTION directive
|
||||
0
test/asm/align-pc-outside-section.out
Normal file
0
test/asm/align-pc-outside-section.out
Normal file
Reference in New Issue
Block a user