Commit-ID: d72bec12bc0f9dbc1aceedb6c831d32b6e47ece1
Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=d72bec12bc0f9dbc1aceedb6c831d32b6e47ece1
Author: Cyrill Gorcunov <gor...@gm...>
AuthorDate: Sun, 15 Feb 2015 18:18:27 +0300
Committer: Cyrill Gorcunov <gor...@gm...>
CommitDate: Sun, 15 Feb 2015 18:18:57 +0300
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 fd52c277dd6) is used to calculate
section size increment.
http://bugzilla.nasm.us/show_bug.cgi?id=3392299
Reported-by: Ben de Waal <be...@de...>
Signed-off-by: Cyrill Gorcunov <gor...@gm...>
---
output/outbin.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/output/outbin.c b/output/outbin.c
index 01eae1c..76a00a8 100644
--- a/output/outbin.c
+++ b/output/outbin.c
@@ -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;
}
|