diff options
author | Jan Beulich <jbeulich@novell.com> | 2005-12-22 17:05:40 +0000 |
---|---|---|
committer | Jan Beulich <jbeulich@novell.com> | 2005-12-22 17:05:40 +0000 |
commit | 2e1e12b1f4d5cdd1c9953a141cde51ee5aa43ee9 (patch) | |
tree | 2bf9eadc3b6d46bd73d99669201c6d00d8806abe /gas/symbols.c | |
parent | e5cc6d1129fca9be54457c858449fdef17405fa7 (diff) | |
download | gdb-2e1e12b1f4d5cdd1c9953a141cde51ee5aa43ee9.zip gdb-2e1e12b1f4d5cdd1c9953a141cde51ee5aa43ee9.tar.gz gdb-2e1e12b1f4d5cdd1c9953a141cde51ee5aa43ee9.tar.bz2 |
gas/
2005-12-22 Jan Beulich <jbeulich@novell.com>
* symbols.h (snapshot_symbol): First parameter is now pointer
to pointer to symbolS.
* symbols.c (snapshot_symbol): Likewise. Store resulting symbol
there. Use symbol_equated_p.
* expr.c (resolve_expression): Change first argument to
snapshot_symbol. Track possibly changed add_symbol consistently
across function. Resolve more special cases with known result.
Also update final_val when replacing add_symbol.
gas/testsuite/
2005-12-22 Jan Beulich <jbeulich@novell.com>
* gas/all/cond.s: Also check .if works on equates to undefined
when the expression value can be known without knowing the
value of the symbol.
* gas/all/cond.l: Adjust.
* gas/i386/equ.s: Also check .if works on (equates to)
registers when the expression value can be known without
knowing the value of the register.
* gas/i386/equ.e: Adjust.
Diffstat (limited to 'gas/symbols.c')
-rw-r--r-- | gas/symbols.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gas/symbols.c b/gas/symbols.c index 8e3d492..c9298e0 100644 --- a/gas/symbols.c +++ b/gas/symbols.c @@ -1355,8 +1355,10 @@ resolve_local_symbol_values (void) sub-expressions used. */ int -snapshot_symbol (symbolS *symbolP, valueT *valueP, segT *segP, fragS **fragPP) +snapshot_symbol (symbolS **symbolPP, valueT *valueP, segT *segP, fragS **fragPP) { + symbolS *symbolP = *symbolPP; + if (LOCAL_SYMBOL_CHECK (symbolP)) { struct local_symbol *locsym = (struct local_symbol *) symbolP; @@ -1385,10 +1387,7 @@ snapshot_symbol (symbolS *symbolP, valueT *valueP, segT *segP, fragS **fragPP) { case O_constant: case O_register: - /* This check wouldn't be needed if pseudo_set() didn't set - symbols equated to bare symbols to undefined_section. */ - if (symbolP->bsym->section != undefined_section - || symbolP->sy_value.X_op != O_symbol) + if (!symbol_equated_p (symbolP)) break; /* Fall thru. */ case O_symbol: @@ -1400,6 +1399,7 @@ snapshot_symbol (symbolS *symbolP, valueT *valueP, segT *segP, fragS **fragPP) } } + *symbolPP = symbolP; *valueP = expr.X_add_number; *segP = symbolP->bsym->section; *fragPP = symbolP->sy_frag; |