ref: 0d02355dbf9fef92c2cf40be09e304601a931014
parent: 2dd9015dc60c8e0bf4fffa25039395e14827eb93
parent: 822e4e7c44a8b7e1d1d2e2172f34ac57aec6a06e
author: Eldred Habert <eldredhabert0@gmail.com>
date: Sun Oct 11 21:43:35 EDT 2020
Merge pull request #599 from NieDzejkob/stray-align Report error when aligning outside of a section
--- a/src/asm/section.c
+++ b/src/asm/section.c
@@ -378,6 +378,7 @@
void sect_AlignPC(uint8_t alignment, uint16_t offset)
{
+ checksection();
struct Section *sect = sect_GetSymbolSection();
if (sect->org != -1) {
--- /dev/null
+++ b/test/asm/align-pc-outside-section.asm
@@ -1,0 +1,1 @@
+align 1
--- /dev/null
+++ b/test/asm/align-pc-outside-section.err
@@ -1,0 +1,2 @@
+FATAL: align-pc-outside-section.asm(1):
+ Code generation before SECTION directive