aboutsummaryrefslogtreecommitdiff
path: root/gas/expr.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-05-25 00:01:30 +0000
committerAlan Modra <amodra@gmail.com>2001-05-25 00:01:30 +0000
commit40e3ba9bb7d85d35590a8828a42b3450e0dcb032 (patch)
tree46c0bb25ffc20aee7a783dbf0dd707e7c9710ed7 /gas/expr.c
parent400071f14b469889399c792d701dc122d1f3d5cc (diff)
downloadgdb-40e3ba9bb7d85d35590a8828a42b3450e0dcb032.zip
gdb-40e3ba9bb7d85d35590a8828a42b3450e0dcb032.tar.gz
gdb-40e3ba9bb7d85d35590a8828a42b3450e0dcb032.tar.bz2
* 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.
Diffstat (limited to 'gas/expr.c')
-rw-r--r--gas/expr.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gas/expr.c b/gas/expr.c
index f79e31c..7e6ad90 100644
--- a/gas/expr.c
+++ b/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
{