From eea57cc6c562574ebcc7b0fd60a664c6fcc236cf Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 23 Feb 2009 17:51:25 -0800 Subject: [PATCH] assemble: only be optimistic with NO_SEG if we're really in pass 1 Only be optimistic about the reachability of a symbol with NO_SEG if we are truly in pass 1, i.e. it could possibly be just a forward reference. After we have done a single pass, if it is still NO_SEG, then it is an absolute symbol and need to be treated as such. --- assemble.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assemble.c b/assemble.c index 748e62f7..6fcb7482 100644 --- a/assemble.c +++ b/assemble.c @@ -263,7 +263,7 @@ static bool jmp_match(int32_t segment, int64_t offset, int bits, isize = calcsize(segment, offset, bits, ins, code); - if (ins->oprs[0].segment == NO_SEG) + if (passn == 1 && ins->oprs[0].segment == NO_SEG) /* Be optimistic in pass 1 */ return true; -- 2.11.4.GIT