Skip to content

Commit 0534306

Browse files
komhhpax
authored andcommitted
outobj: disallow the combination of USE16(16-bit segment) and FLAT
FLAT should be used only with USE32(32-bit segment). Signed-off-by: KO Myung-Hun <[email protected]>
1 parent 3f37cac commit 0534306

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

output/outobj.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,6 +1492,9 @@ static int32_t obj_segment(char *name, int *bits)
14921492
}
14931493
}
14941494

1495+
if (!seg->use32 && seg->grp && !strcmp(seg->grp->name, "FLAT"))
1496+
nasm_panic("wrong combination of USE16(16-bit segment) and FLAT");
1497+
14951498
/* We need to know whenever we have at least one 32-bit segment */
14961499
obj_use32 |= seg->use32;
14971500

0 commit comments

Comments
 (0)