0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-10-10 00:25:06 -04:00

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;