0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-10-10 00:25:06 -04:00

output: bin -- Fix section length miscalc for OUT_ADDRESS

While we using proper @asize variable for relocation itself
we miss the fact that @size variable (which might be negative
for signed relocations since fd52c277dd) is used to calculate
section size increment.

http://bugzilla.nasm.us/show_bug.cgi?id=3392299

Reported-by: Ben de Waal <ben@dewaals.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Cyrill Gorcunov
2015-02-15 18:18:27 +03:00
parent 6d42e9ba47
commit d72bec12bc

View File

@@ -781,6 +781,12 @@ static void bin_out(int32_t segto, const void *data,
WRITEADDR(p, *(int64_t *)data, asize);
saa_wbytes(s->contents, mydata, asize);
}
/*
* Reassign size with sign dropped, we will need it
* for section length calculation.
*/
size = asize;
break;
}