mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-02-11 17:10:45 +08:00
absolute: in absolute space, need to use absolute.segment
We can be in absolute space and still end up with segment-relative references. This is in fact the meaning of absolute.segment. Make sure we define the labels appropriately. Reported-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
parent
6bc18f1978
commit
415b6b3df1
@ -399,6 +399,7 @@ bool process_directives(char *directive)
|
||||
"in pass two");
|
||||
in_absolute = true;
|
||||
location.segment = NO_SEG;
|
||||
location.offset = absolute.offset;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -486,7 +486,8 @@ restart_parse:
|
||||
* Generally fix things. I think this is right as it is, but
|
||||
* am still not certain.
|
||||
*/
|
||||
define_label(result->label, location.segment,
|
||||
define_label(result->label,
|
||||
in_absolute ? absolute.segment : location.segment,
|
||||
location.offset, true);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user