diff options
author | Keith Kanios <spook@dynatos.net> | 2007-04-18 02:24:34 +0000 |
---|---|---|
committer | Keith Kanios <spook@dynatos.net> | 2007-04-18 02:24:34 +0000 |
commit | 7295e9856dea66699f84eb95038919d33710b170 (patch) | |
tree | ff1ead410dbee27f951cbf804b8e034adf75d541 /output | |
parent | 0db11e236b7820f8ec6c2fd1846b17099e4f9386 (diff) | |
download | nasm-7295e9856dea66699f84eb95038919d33710b170.tar.gz nasm-7295e9856dea66699f84eb95038919d33710b170.tar.bz2 nasm-7295e9856dea66699f84eb95038919d33710b170.zip |
Fixed RDF/2 to comply with "maxbits" use.
Diffstat (limited to 'output')
-rw-r--r-- | output/outrdf.c | 3 | ||||
-rw-r--r-- | output/outrdf2.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/output/outrdf.c b/output/outrdf.c index 3c72652..cd311de 100644 --- a/output/outrdf.c +++ b/output/outrdf.c @@ -194,6 +194,7 @@ static int32_t bsslength; static void rdf_init(FILE * fp, efunc errfunc, ldfunc ldef, evalfunc eval) { + maxbits = 64; ofile = fp; error = errfunc; seg[0] = newmembuf(); @@ -423,7 +424,7 @@ static void rdf_out(int32_t segto, void *data, uint32_t type, membufwrite(seg[segto], &rr.offset, -2); } else if (type == OUT_REL4ADR) { - if (segment == segto) + if ((segment == segto) && (globalbits != 64)) error(ERR_PANIC, "intra-segment OUT_REL4ADR"); if (segment != NO_SEG && segment % 2) { error(ERR_NONFATAL, diff --git a/output/outrdf2.c b/output/outrdf2.c index 9fa2153..7fb4615 100644 --- a/output/outrdf2.c +++ b/output/outrdf2.c @@ -88,6 +88,8 @@ static void rdf2_init(FILE * fp, efunc errfunc, ldfunc ldef, evalfunc eval) (void)ldef; (void)eval; + maxbits = 64; + int segtext, segdata, segbss; /* set up the initial segments */ @@ -624,7 +626,7 @@ static void rdf2_out(int32_t segto, const void *data, uint32_t type, membufwrite(segto, &rr.offset, -2); } else if (type == OUT_REL4ADR) { - if (segment == segto) + if ((segment == segto) && (globalbits != 64)) error(ERR_PANIC, "intra-segment OUT_REL4ADR"); if (segment != NO_SEG && segment % 2) { error(ERR_PANIC, "erm... 4 byte segment base ref?"); |