public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Patch for ppc gas
@ 2001-05-24 11:47 Tom Rix
  2001-05-24 12:26 ` Eric Christopher
  2001-05-24 12:34 ` Geoff Keating
  0 siblings, 2 replies; 3+ messages in thread
From: Tom Rix @ 2001-05-24 11:47 UTC (permalink / raw)
  To: binutils

This is a patch for a segfault in gas when running the 

gcc/testsuite/g77.f-torture/compile/19990905-2.f

A stabx symbol was not being correctly generated.

-- 
Tom Rix 
GCC Engineer
trix@redhat.com
256.704.9201
diff -rcp gas/ChangeLog gas-new/ChangeLog
*** gas/ChangeLog	Thu May 24 11:34:18 2001
--- gas-new/ChangeLog	Thu May 24 11:33:24 2001
***************
*** 1,3 ****
--- 1,7 ----
+ 2000-05-24  Tom Rix <trix@redhat.com>
+ 
+ 	* config/tc-ppc.c (ppc_stabx) : fix generated symbol
+ 	
diff -rcp gas/config/tc-ppc.c gas-new/config/tc-ppc.c
*** gas/config/tc-ppc.c	Thu May 24 11:34:24 2001
--- gas-new/config/tc-ppc.c	Thu May 24 11:33:31 2001
*************** ppc_stabx (ignore)
*** 2766,2773 ****
  
    symbol_get_tc (sym)->output = 1;
  
!   if (S_GET_STORAGE_CLASS (sym) == C_STSYM)
      symbol_get_tc (sym)->within = ppc_current_block;
  
    if (exp.X_op != O_symbol
        || ! S_IS_EXTERNAL (exp.X_add_symbol)
--- 2766,2797 ----
  
    symbol_get_tc (sym)->output = 1;
  
!   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.
+ 
+ 	Tom Rix, 5.23.01
+   */
+ 
+ 	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)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Patch for ppc gas
  2001-05-24 11:47 Patch for ppc gas Tom Rix
@ 2001-05-24 12:26 ` Eric Christopher
  2001-05-24 12:34 ` Geoff Keating
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Christopher @ 2001-05-24 12:26 UTC (permalink / raw)
  To: Tom Rix; +Cc: binutils

> + 
> +     Tom Rix, 5.23.01
> +   */
> + 

This sort of thing is not usually done.  The comment is good enough.

-eric

-- 
Pain is not the cleanser

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Patch for ppc gas
  2001-05-24 11:47 Patch for ppc gas Tom Rix
  2001-05-24 12:26 ` Eric Christopher
@ 2001-05-24 12:34 ` Geoff Keating
  1 sibling, 0 replies; 3+ messages in thread
From: Geoff Keating @ 2001-05-24 12:34 UTC (permalink / raw)
  To: trix; +Cc: binutils

This patch is OK.

-- 
- Geoffrey Keating <geoffk@geoffk.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-05-24 12:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-24 11:47 Patch for ppc gas Tom Rix
2001-05-24 12:26 ` Eric Christopher
2001-05-24 12:34 ` Geoff Keating

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).