diff options
Diffstat (limited to 'gas/symbols.c')
-rw-r--r-- | gas/symbols.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gas/symbols.c b/gas/symbols.c index c9298e0..ca2d41e 100644 --- a/gas/symbols.c +++ b/gas/symbols.c @@ -1399,7 +1399,10 @@ snapshot_symbol (symbolS **symbolPP, valueT *valueP, segT *segP, fragS **fragPP) } } - *symbolPP = symbolP; + /* Never change a defined symbol. */ + if (symbolP->bsym->section == undefined_section + || symbolP->bsym->section == expr_section) + *symbolPP = symbolP; *valueP = expr.X_add_number; *segP = symbolP->bsym->section; *fragPP = symbolP->sy_frag; |