summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-02-23 17:51:25 -0800
committerH. Peter Anvin <hpa@zytor.com>2009-02-23 17:51:25 -0800
commiteea57cc6c562574ebcc7b0fd60a664c6fcc236cf (patch)
tree8d07cf395bf968473c3741285c84cda50b51be7c
parent130360f8f5caa7b8e10c3a1b4f90a69549ae61d7 (diff)
downloadnasm-eea57cc6c562574ebcc7b0fd60a664c6fcc236cf.tar.gz
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.
-rw-r--r--assemble.c2
1 files changed, 1 insertions, 1 deletions
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;