summaryrefslogtreecommitdiff
path: root/output/outas86.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2018-06-15 00:03:53 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2018-06-15 00:03:53 -0700
commited859f72a120888868eb37beee0fcb2ab1710af5 (patch)
treebf426751c5ecea02fb29a42cb1f038a05ee0e4ca /output/outas86.c
parent0125c446ddba6ce02cc5654bdcfcfa41e46b8223 (diff)
downloadnasm-ed859f72a120888868eb37beee0fcb2ab1710af5.tar.gz
output: remove ABSOLUTE handling, OUT_RAWDATA asserts
ABSOLUTE handling can be done centrally, and shouldn't need to be in every backend. Simply drop the call to ofmt->output(). Many backends have an assert for OUT_RAWDATA not having a target segment; this doesn't make any sense as output/legacy.c will not allow that to happen. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'output/outas86.c')
-rw-r--r--output/outas86.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/output/outas86.c b/output/outas86.c
index a72f37aa..3a84fc07 100644
--- a/output/outas86.c
+++ b/output/outas86.c
@@ -297,16 +297,6 @@ static void as86_out(int32_t segto, const void *data,
nasm_error(ERR_NONFATAL, "WRT not supported by as86 output format");
}
- /*
- * handle absolute-assembly (structure definitions)
- */
- if (segto == NO_SEG) {
- if (type != OUT_RESERVE)
- nasm_error(ERR_NONFATAL, "attempt to assemble code in [ABSOLUTE]"
- " space");
- return;
- }
-
if (segto == stext.index)
s = &stext;
else if (segto == sdata.index)
@@ -338,8 +328,6 @@ static void as86_out(int32_t segto, const void *data,
} else
bsslen += size;
} else if (type == OUT_RAWDATA) {
- if (segment != NO_SEG)
- nasm_panic(0, "OUT_RAWDATA with other than NO_SEG");
as86_sect_write(s, data, size);
as86_add_piece(s, 0, 0L, 0L, size, 0);
} else if (type == OUT_ADDRESS) {
@@ -359,8 +347,6 @@ static void as86_out(int32_t segto, const void *data,
as86_add_piece(s, 0, 0L, 0L, asize, 0);
}
} else if (type == OUT_REL2ADR) {
- if (segment == segto)
- nasm_panic(0, "intra-segment OUT_REL2ADR");
if (segment != NO_SEG) {
if (segment % 2) {
nasm_error(ERR_NONFATAL, "as86 format does not support"
@@ -372,8 +358,6 @@ static void as86_out(int32_t segto, const void *data,
}
}
} else if (type == OUT_REL4ADR) {
- if (segment == segto)
- nasm_panic(0, "intra-segment OUT_REL4ADR");
if (segment != NO_SEG) {
if (segment % 2) {
nasm_error(ERR_NONFATAL, "as86 format does not support"