diff options
author | H. Peter Anvin <hpa@zytor.com> | 2016-02-11 21:13:54 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2016-02-11 21:13:54 -0800 |
commit | b03d91e6ab7686f5dee77c1e550fda9fd7abbb68 (patch) | |
tree | 1230970a6f1aaaad0da18a022ea78c0bca86ef84 | |
parent | b64125022d9743df8428d2fa925b36632b8ffc2a (diff) | |
download | nasm-b03d91e6ab7686f5dee77c1e550fda9fd7abbb68.tar.gz |
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>
-rw-r--r-- | assemble.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); |