From fb5e768142f85cfef6591627b217d49bb1af903b Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Fri, 20 Mar 2020 16:37:10 +0100 Subject: [PATCH] Prevent using `LOAD` blocks outide code sections --- src/asm/section.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/asm/section.c b/src/asm/section.c index a498256e..3be3eb8f 100644 --- a/src/asm/section.c +++ b/src/asm/section.c @@ -206,6 +206,8 @@ void out_NewSection(char const *pzName, uint32_t type, int32_t org, void out_SetLoadSection(char const *name, uint32_t type, int32_t org, struct SectionSpec const *attributes) { + checkcodesection(); + if (currentLoadSection) fatalerror("`LOAD` blocks cannot be nested");