mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-04-12 18:40:23 +08:00
Fixed RDF/2 to comply with "maxbits" use.
This commit is contained in:
parent
0db11e236b
commit
7295e9856d
@ -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,
|
||||
|
@ -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?");
|
||||
|
Loading…
x
Reference in New Issue
Block a user