This is the mail archive of the gas2@sourceware.cygnus.com mailing list for the gas2 project.


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

Re: An alpha/gas bug


> 
> > From what I see, binutils 2.8.1 and binutils gas-971031 treat
> > 
> > 	lda $0,_t12basic_string2ZcZt18string_char_traits1Zc$nilRep+32
> > 
> > differently. binutils 2.8.1 generates
> > 
> > 	ldq     v0,0(gp)
> > 	lda     v0,32(v0)
> > 
> > and gas-971031 generates
> > 
> > 	ldq     v0,0(gp)
> > 
> > I think that is a bug in gas.
> 
> Nope.  If you'll notice, gas-971031 generates
> 
>   4c: ELF_LITERAL _t12basic_string2ZcZt18string_char_traits1Zc$nilRep+0x20
>                                                                      ^^^^^
> 
> Now, the problem may be in either ld or ld.so in their handling of
> dynamic relocations.  I'll check on it later, as I'm a bit busy right now.
> 


Hi,

As of gas 980114, I and other people have verified that the patch
below is needed for Linux/Alpha to pass "make check" for egcs with
libg++ as well as build a working glibc 2. I intend to include it
in the next binutils for Linux.

Thanks.


H.J.
----
Wed Jan 21 17:10:34 1998  H.J. Lu  (hjl@gnu.org)

	* config/tc-alpha.c (load_expression): Undo the change of
	Wed Oct  8 16:28:53 1997  Richard Henderson  <rth@cygnus.com>.

Index: config/tc-alpha.c
===================================================================
RCS file: /home/work/cvs/gnu/binutils/gas/config/tc-alpha.c,v
retrieving revision 1.10
diff -u -r1.10 tc-alpha.c
--- tc-alpha.c	1998/01/15 17:52:30	1.10
+++ tc-alpha.c	1998/01/22 01:08:07
@@ -2256,7 +2256,11 @@
 	/* XXX: Disable this .got minimizing optimization so that we can get
 	   better instruction offset knowledge in the compiler.  This happens
 	   very infrequently anyway.  */
+	/* FIXME: Enable it again. Otherwise, it won't work on
+	   Linux/Alpha.
 	if (1 || !range_signed_32 (addend)
+	*/
+	if (!range_signed_32 (addend)
 	    && (alpha_noat_on || targreg == AXP_REG_AT))
 	  {
 	    newtok[1] = *exp;