diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2015-02-15 18:18:27 +0300 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2015-02-15 18:18:57 +0300 |
commit | d72bec12bc0f9dbc1aceedb6c831d32b6e47ece1 (patch) | |
tree | 16f7f4a5ce0561b1a630e8e08c5ad0f9099f54f9 | |
parent | 6d42e9ba4730dc8472e4ec698e2af549c53861c3 (diff) | |
download | nasm-d72bec12bc0f9dbc1aceedb6c831d32b6e47ece1.tar.gz |
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 <ben@dewaals.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r-- | output/outbin.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/output/outbin.c b/output/outbin.c index 01eae1cf..76a00a82 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; } |