summaryrefslogtreecommitdiff
path: root/gas/expr.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2009-12-08 03:14:28 +0000
committerH.J. Lu <hjl@lucon.org>2009-12-08 03:14:28 +0000
commit2dc135481bfba526071fb269b37267f712e3b2ed (patch)
tree4f6ec64429dad19ef41958e0b042314e16e504a5 /gas/expr.c
parent351b7f1c5943d51b585d157015472c2b906ad745 (diff)
downloadbinutils-redhat-2dc135481bfba526071fb269b37267f712e3b2ed.tar.gz
Call symbol_same_p to check to if 2 symbols are the same.
gas/ 2009-12-07 H.J. Lu <hongjiu.lu@intel.com> PR gas/11037 * expr.c (resolve_expression): Call symbol_same_p to check if 2 symbols are the same. * symbols.c (symbol_same_p): New. * symbols.h (symbol_same_p): Likewise. gas/testsuite/ 2009-12-07 H.J. Lu <hongjiu.lu@intel.com> PR gas/11037 * gas/i386/intelpic.s: Add testcases. * gas/i386/intelpic.d: Updated.
Diffstat (limited to 'gas/expr.c')
-rw-r--r--gas/expr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gas/expr.c b/gas/expr.c
index 094141f6e3..fbfdffc675 100644
--- a/gas/expr.c
+++ b/gas/expr.c
@@ -2237,8 +2237,7 @@ resolve_expression (expressionS *expressionP)
op = O_constant;
else if (seg_left == reg_section && final_val == 0)
op = O_register;
- else if (seg_left == undefined_section
- && add_symbol != orig_add_symbol)
+ else if (!symbol_same_p (add_symbol, orig_add_symbol))
final_val += left;
expressionP->X_add_symbol = add_symbol;
}