aboutsummaryrefslogtreecommitdiff
path: root/gas/symbols.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2006-01-09 17:14:40 +0000
committerH.J. Lu <hjl.tools@gmail.com>2006-01-09 17:14:40 +0000
commit4dcb3903aa6c0c1cfcc88b850c7d91bf4d7d4d97 (patch)
treead8193ef054728afab2864a5ae7b672c9f6972dd /gas/symbols.c
parent5e5e11bd07f75b88a9eabbdabe4cec008ef90569 (diff)
downloadgdb-4dcb3903aa6c0c1cfcc88b850c7d91bf4d7d4d97.zip
gdb-4dcb3903aa6c0c1cfcc88b850c7d91bf4d7d4d97.tar.gz
gdb-4dcb3903aa6c0c1cfcc88b850c7d91bf4d7d4d97.tar.bz2
gas/
2006-01-09 H.J. Lu <hongjiu.lu@intel.com> PR gas/2117 * symbols.c (snapshot_symbol): Don't change a defined symbol. gas/testsuite/ 2006-01-09 H.J. Lu <hongjiu.lu@intel.com> PR gas/2117 * gas/ia64/ia64.exp: Add ltoff22x-2, ltoff22x-3, ltoff22x-4 and ltoff22x-5. * gas/ia64/ltoff22x-2.d: New file. * gas/ia64/ltoff22x-2.s: Likewise. * gas/ia64/ltoff22x-3.d: Likewise. * gas/ia64/ltoff22x-3.s: Likewise. * gas/ia64/ltoff22x-4.d: Likewise. * gas/ia64/ltoff22x-4.s: Likewise. * gas/ia64/ltoff22x-5.d: Likewise. * gas/ia64/ltoff22x-5.s: Likewise.
Diffstat (limited to 'gas/symbols.c')
-rw-r--r--gas/symbols.c5
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;