LOAD blocks cannot create a ROM section

Fixes #576
This commit is contained in:
Rangi
2020-12-16 11:32:03 -05:00
committed by Eldred Habert
parent 1d9cc01ae1
commit 063a22ddf9
4 changed files with 11 additions and 0 deletions

View File

@@ -339,6 +339,9 @@ void out_SetLoadSection(char const *name, uint32_t type, uint32_t org,
if (currentLoadSection)
fatalerror("`LOAD` blocks cannot be nested\n");
if (sect_HasData(type))
error("`LOAD` blocks cannot create a ROM section\n");
struct Section *sect = getSection(name, type, org, attribs, false);
loadOffset = curOffset;