output: outmac64 -- Fix the case when first hit matches the symbol

In case if we're looking up for a symbol and it's first
one in symbol table we might endup with error because of
using GE here (78f477b35f) ending cycle with @nearest = NULL.

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

Reprted-by: Benjamin Randazzo <benjamin@linuxcrashing.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Cyrill Gorcunov 2015-05-09 18:07:47 +03:00
parent 1f0cb0f2c1
commit 4920a03243

@ -304,7 +304,7 @@ static struct symbol *get_closest_section_symbol_by_offset(uint8_t fileindex, in
for (sym = syms; sym; sym = sym->next) {
if ((sym->sect != NO_SECT) && (sym->sect == fileindex)) {
if ((int64_t)sym->value >= offset)
if ((int64_t)sym->value > offset)
break;
nearest = sym;
}