[Nasm-commits] [nasm:nasm-2.12.xx] assemble.c: only warn for an absolute address on pass 2

nasm-bot for H. Peter Anvin hpa at linux.intel.com
Thu Jun 4 19:56:38 PDT 2020


Commit-ID:  e5f0701d0b738a146d647a0e870a1934955b99ce
Gitweb:     http://repo.or.cz/w/nasm.git?a=commitdiff;h=e5f0701d0b738a146d647a0e870a1934955b99ce
Author:     H. Peter Anvin <hpa at linux.intel.com>
AuthorDate: Mon, 20 Feb 2017 13:07:57 -0800
Committer:  H. Peter Anvin <hpa at linux.intel.com>
CommitDate: Mon, 20 Feb 2017 13:07:57 -0800

assemble.c: only warn for an absolute address on pass 2

A forward symbol may appear absolute in pass 1, so defer this warning
to pass 2.  This addresses BR 3392361.

Note: this fix is already in the master branch.

Signed-off-by: H. Peter Anvin <hpa at linux.intel.com>


---
 assemble.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/assemble.c b/assemble.c
index 0971fa3a..254049eb 100644
--- a/assemble.c
+++ b/assemble.c
@@ -1,6 +1,6 @@
 /* ----------------------------------------------------------------------- *
  *
- *   Copyright 1996-2016 The NASM Authors - All Rights Reserved
+ *   Copyright 1996-2017 The NASM Authors - All Rights Reserved
  *   See the file AUTHORS included with the NASM distribution for
  *   the specific copyright holders.
  *
@@ -2492,7 +2492,7 @@ static enum ea_type process_ea(operand *input, ea *output, int bits,
              */
             if (bits == 64 && ((input->type & IP_REL) == IP_REL) &&
                 input->segment == NO_SEG) {
-                nasm_error(ERR_WARNING | ERR_PASS1, "absolute address can not be RIP-relative");
+                nasm_error(ERR_WARNING | ERR_PASS2, "absolute address can not be RIP-relative");
                 input->type &= ~IP_REL;
                 input->type |= MEMORY;
             }


More information about the Nasm-commits mailing list