* expr.c (expr): Set return value to absolute_section for
subtractive operations on symbols within a segment. * read.c (pseudo_set): Set segment for complex expressions.
This commit is contained in:
parent
400071f14b
commit
40e3ba9bb7
3 changed files with 21 additions and 3 deletions
13
gas/expr.c
13
gas/expr.c
|
@ -1862,6 +1862,19 @@ expr (rankarg, resultP)
|
|||
resultP->X_add_number += right.X_add_number;
|
||||
else if (op_left == O_subtract)
|
||||
resultP->X_add_number -= right.X_add_number;
|
||||
if (retval == rightseg
|
||||
&& (op_left == O_subtract
|
||||
|| op_left == O_eq
|
||||
|| op_left == O_ne
|
||||
|| op_left == O_lt
|
||||
|| op_left == O_le
|
||||
|| op_left == O_ge
|
||||
|| op_left == O_gt))
|
||||
{
|
||||
/* For subtractive operations on symbols within a
|
||||
segment, the result will absolute. */
|
||||
retval = absolute_section;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue