This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Your GAS change caused a testsuite regression for cris-elf


>>> Alan Modra <amodra@bigpond.net.au> 20.09.05 17:05:23 >>>
>On Tue, Sep 20, 2005 at 02:26:07PM +0200, Hans-Peter Nilsson wrote:
>> 2005-09-20  Alan Modra  <amodra@bigpond.net.au>
>> 
>> 	* read.c (pseudo_set): Set segment of expression syms to
expr_section.
>> 
>> actually caused the regression, but it does, or at least causes
>
>I think the following obvious fix should cure the problem, but I'll
wait
>until the morning to commit (and this time after I've tested lots of
>targets).
>
>	* read.c (pseudo_set): Don't set undefined symbols to
expr_section.
>
>Index: gas/read.c
>===================================================================
>RCS file: /cvs/src/src/gas/read.c,v
>retrieving revision 1.107
>diff -u -p -r1.107 read.c
>--- gas/read.c	20 Sep 2005 03:06:13 -0000	1.107
>+++ gas/read.c	20 Sep 2005 15:02:59 -0000
>@@ -3259,7 +3259,10 @@ pseudo_set (symbolS *symbolP)
> 	  copy_symbol_attributes (symbolP, s);
> 	  break;
> 	}
>-      /* Fall thru */
>+      S_SET_SEGMENT (symbolP, undefined_section);
>+      symbol_set_value_expression (symbolP, &exp);
>+      set_zero_frag (symbolP);
>+      break;
> 
>     default:
>       /* The value is some complex expression.  */
>

I don't think this is correct, as it leads to failure recognizing the
redefinition of x in

	.equiv	x, y
	.equiv	x, 1

or, even less logical (because x by the time it gets redefined is fully
resolvable),

	.equiv	x, y
	.equiv	y, 1
	.equiv	x, 1

The problem observed by Hans-Peter probably needs to be fixed in a.out
and/or stabs related code.

Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]