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 <komh78@gmail.com>
This commit is contained in:
KO Myung-Hun 2024-11-29 11:29:35 +09:00 committed by H. Peter Anvin
parent 3f37cacdd2
commit 05343069fa

View file

@ -1492,6 +1492,9 @@ static int32_t obj_segment(char *name, int *bits)
}
}
if (!seg->use32 && seg->grp && !strcmp(seg->grp->name, "FLAT"))
nasm_panic("wrong combination of USE16(16-bit segment) and FLAT");
/* We need to know whenever we have at least one 32-bit segment */
obj_use32 |= seg->use32;