aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-ppc.c
diff options
context:
space:
mode:
authorTom Rix <trix@redhat.com>2001-05-24 21:39:09 +0000
committerTom Rix <trix@redhat.com>2001-05-24 21:39:09 +0000
commit6877bb43e568ec434f3ade26c8f0be850ac03083 (patch)
tree9f4b2331fd7ac77e3b7fd0f0b296cb8cbf8ae6e4 /gas/config/tc-ppc.c
parent11a383ba1714b896b7a547d2ce2436e821d92aa0 (diff)
downloadgdb-6877bb43e568ec434f3ade26c8f0be850ac03083.zip
gdb-6877bb43e568ec434f3ade26c8f0be850ac03083.tar.gz
gdb-6877bb43e568ec434f3ade26c8f0be850ac03083.tar.bz2
Fix for gas seg fault and neg line numbers
Diffstat (limited to 'gas/config/tc-ppc.c')
-rw-r--r--gas/config/tc-ppc.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index 0860645..73a0db9 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -2845,9 +2845,31 @@ ppc_stabx (ignore)
symbol_get_tc (sym)->output = 1;
- if (S_GET_STORAGE_CLASS (sym) == C_STSYM)
+ if (S_GET_STORAGE_CLASS (sym) == C_STSYM) {
+
symbol_get_tc (sym)->within = ppc_current_block;
+ /*
+ In this case :
+
+ .bs name
+ .stabx "z",arrays_,133,0
+ .es
+
+ .comm arrays_,13768,3
+
+ resolve_symbol_value will copy the exp's "within" into sym's when the
+ offset is 0. Since this seems to be corner case problem,
+ only do the correction for storage class C_STSYM. A better solution
+ would be to have the tc field updated in ppc_symbol_new_hook.
+
+ */
+
+ if (exp.X_op == O_symbol) {
+ symbol_get_tc (exp.X_add_symbol)->within = ppc_current_block;
+ }
+ }
+
if (exp.X_op != O_symbol
|| ! S_IS_EXTERNAL (exp.X_add_symbol)
|| S_GET_SEGMENT (exp.X_add_symbol) != bss_section)