aboutsummaryrefslogtreecommitdiff
path: root/gas/expr.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2010-12-01 20:35:13 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2010-12-01 20:35:13 +0000
commit3df4e177c9bdd2dd095a3c4e437ffba47cf32b37 (patch)
tree1e0b4d6935ae4502e8902e89b6eab3b00d87ed6c /gas/expr.c
parent5f5f22c0ceea6f393a7768e475705f4e553e511e (diff)
downloadgdb-3df4e177c9bdd2dd095a3c4e437ffba47cf32b37.zip
gdb-3df4e177c9bdd2dd095a3c4e437ffba47cf32b37.tar.gz
gdb-3df4e177c9bdd2dd095a3c4e437ffba47cf32b37.tar.bz2
* symbols.c (symbol_clone_if_forward_ref): Don't limit cloning
to expr_section symbols; clone all equated symbols. Clear sy_resolving of the cloned copy. * expr.c (operand): Only clone equated symbols on a final (i.e. non-equated) reference.
Diffstat (limited to 'gas/expr.c')
-rw-r--r--gas/expr.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gas/expr.c b/gas/expr.c
index f050b17..620fdce 100644
--- a/gas/expr.c
+++ b/gas/expr.c
@@ -1373,8 +1373,13 @@ operand (expressionS *expressionP, enum expr_mode mode)
if (expressionP->X_add_symbol)
symbol_mark_used (expressionP->X_add_symbol);
- expressionP->X_add_symbol = symbol_clone_if_forward_ref (expressionP->X_add_symbol);
- expressionP->X_op_symbol = symbol_clone_if_forward_ref (expressionP->X_op_symbol);
+ if (mode != expr_defer)
+ {
+ expressionP->X_add_symbol
+ = symbol_clone_if_forward_ref (expressionP->X_add_symbol);
+ expressionP->X_op_symbol
+ = symbol_clone_if_forward_ref (expressionP->X_op_symbol);
+ }
switch (expressionP->X_op)
{