diff options
author | H. Peter Anvin <hpa@zytor.com> | 2002-05-26 19:49:41 +0000 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2002-05-26 19:49:41 +0000 |
commit | 667dd804e651001c60f0e0b8dc3d08ec3ebeb0ee (patch) | |
tree | 50e84e3a493d49963c0fa0a8c6ff020eeda7fcd4 /eval.c | |
parent | 460764e07f11ac987e1352bb873b5687f66df77c (diff) | |
download | nasm-667dd804e651001c60f0e0b8dc3d08ec3ebeb0ee.tar.gz nasm-667dd804e651001c60f0e0b8dc3d08ec3ebeb0ee.tar.bz2 nasm-667dd804e651001c60f0e0b8dc3d08ec3ebeb0ee.zip |
Handle $ and $$ in ABSOLUTE sections
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -45,6 +45,10 @@ static int *opflags; static struct eval_hints *hint; +extern int in_abs_seg; /* ABSOLUTE segment flag */ +extern long abs_seg; /* ABSOLUTE segment */ +extern long abs_offset; /* ABSOLUTE segment offset */ + /* * Unimportant cleanup is done to avoid confusing people who are trying * to debug real memory leaks @@ -701,11 +705,11 @@ static expr *expr6(int critical) type = EXPR_SIMPLE; /* might get overridden by UNKNOWN */ if (i == TOKEN_BASE) { - label_seg = location->segment; + label_seg = in_abs_seg ? abs_seg : location->segment; label_ofs = 0; } else if (i == TOKEN_HERE) { - label_seg = location->segment; - label_ofs = location->offset; + label_seg = in_abs_seg ? abs_seg : location->segment; + label_ofs = in_abs_seg ? abs_offset : location->offset; } else { if (!labelfunc(tokval->t_charptr,&label_seg,&label_ofs)) { |