From: nasm-bot f. H. P. A. <hp...@zy...> - 2016-02-12 05:16:14
|
Commit-ID: b03d91e6ab7686f5dee77c1e550fda9fd7abbb68 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=b03d91e6ab7686f5dee77c1e550fda9fd7abbb68 Author: H. Peter Anvin <hp...@zy...> AuthorDate: Thu, 11 Feb 2016 21:13:54 -0800 Committer: H. Peter Anvin <hp...@zy...> CommitDate: Thu, 11 Feb 2016 21:13:54 -0800 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 <hp...@zy...> --- assemble.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assemble.c b/assemble.c index b1e6821..acaf24b 100644 --- a/assemble.c +++ b/assemble.c @@ -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); |