mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-21 03:14:19 +08:00
assemble.c: fix the handling of zero-extending unsigned relocations
First of all we printed the wrong error message, and second of all we need to set the segments to NO_SEG before passing them to the output format generator. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
b64125022d
commit
b03d91e6ab
@ -383,12 +383,13 @@ static void out(int64_t offset, int32_t segto, const void *data,
|
||||
} else {
|
||||
errfunc(ERR_WARNING | ERR_WARN_ZEXTRELOC,
|
||||
"%d-bit unsigned relocation zero-extended from %d bits\n",
|
||||
asize << 4, outfmt->maxbits);
|
||||
asize << 3, outfmt->maxbits);
|
||||
outfmt->output(segto, data, type, amax, segment, wrt);
|
||||
size -= amax;
|
||||
}
|
||||
data = zero_buffer;
|
||||
type = OUT_RAWDATA;
|
||||
segment = wrt = NO_SEG;
|
||||
}
|
||||
|
||||
outfmt->output(segto, data, type, size, segment, wrt);
|
||||
|
Loading…
Reference in New Issue
Block a user