aboutsummaryrefslogtreecommitdiff
path: root/gas/symbols.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/symbols.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/symbols.c')
-rw-r--r--gas/symbols.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gas/symbols.c b/gas/symbols.c
index 7b5e514..e432b86 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -645,7 +645,8 @@ symbol_clone_if_forward_ref (symbolS *symbolP, int is_forward)
/* Re-using sy_resolving here, as this routine cannot get called from
symbol resolution code. */
- if (symbolP->bsym->section == expr_section && !symbolP->sy_resolving)
+ if ((symbolP->bsym->section == expr_section || symbolP->sy_forward_ref)
+ && !symbolP->sy_resolving)
{
symbolP->sy_resolving = 1;
add_symbol = symbol_clone_if_forward_ref (add_symbol, is_forward);
@@ -656,7 +657,10 @@ symbol_clone_if_forward_ref (symbolS *symbolP, int is_forward)
if (symbolP->sy_forward_ref
|| add_symbol != symbolP->sy_value.X_add_symbol
|| op_symbol != symbolP->sy_value.X_op_symbol)
- symbolP = symbol_clone (symbolP, 0);
+ {
+ symbolP = symbol_clone (symbolP, 0);
+ symbolP->sy_resolving = 0;
+ }
symbolP->sy_value.X_add_symbol = add_symbol;
symbolP->sy_value.X_op_symbol = op_symbol;