This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: gas crashes on IRIX 5.2
- To: hjl at lucon dot org (H.J. Lu)
- Subject: Re: gas crashes on IRIX 5.2
- From: Alexandre Oliva <oliva at lsd dot ic dot unicamp dot br>
- Date: 03 Dec 1999 16:16:37 -0200
- Cc: binutils at sourceware dot cygnus dot com, gcc-bugs at gcc dot gnu dot org
- References: <19991203173931.A75DB1B493@ocean.lucon.org>
On Dec 3, 1999, hjl@lucon.org (H.J. Lu) wrote:
>> FYI, there may be something wrong on AIX4.1.5.0/rs6000's assembler of
>> release 2.9.5.0.21, that isn't wrong in binutils CVS.
> I didn't touch anything in PPC. Please try 2.9.5.0.22. The bug
> may be fixed from the CVS update.
Nope, I spoke too soon. The bug has just come up with CVS binutils
too :-(
> If you can send me the asm code and tell me how to configure the
> cross assembler, I will fix it.
Thanks, but it won't build as a cross toolchain :-(
The exact error message is:
test x"yes" != xyes || /tmp/install-gnu-gcc-2.95.2-libg++-2.8.1.3-libgcj-2.95.1-visconde-11094/libg++-2.8.1.3/gcc/xgcc -B/tmp/install-gnu-gcc-2.95.2-libg++-2.8.1.3-libgcj-2.95.1-visconde-11094/libg++-2.8.1.3/gcc/ -B/n/gnu/gcc-2.95.2-libg++-2.8.1.3-libgcj-2.95.1/powerpc-ibm-aix4.1.5.0/bin/ -c -g -O2 -fno-implicit-templates -I. -I. -nostdinc++ streambuf.cc -o pic/streambuf.o
/tmp/ccJPpGNZ.s: Assembler messages:
/tmp/ccJPpGNZ.s:1971: Error: Line numbers must be positive integers
/tmp/ccJPpGNZ.s:1983: Error: Line numbers must be positive integers
The problem is that gcc 2.95.2, configured --with-gnu-as
--with-gnu-ld, is generating `.line 0' debugging directives.
It's most definitely a bug in gcc, since the code in
gas/config/obj-coff.c says line 0 is used as an end marker. The
following patch causes gas to accept `.line 0', as does the native
assembler:
Index: gas/ChangeLog
from Alexandre Oliva <oliva@lsd.ic.unicamp.br>
* config/obj-coff.c (add_lineno): Accept zero with warning and
bump it to 1.
Index: gas/config/obj-coff.c
===================================================================
RCS file: /cvs/binutils/binutils/gas/config/obj-coff.c,v
retrieving revision 1.19
diff -u -r1.19 obj-coff.c
--- gas/config/obj-coff.c 1999/09/12 03:44:41 1.19
+++ gas/config/obj-coff.c 1999/12/03 18:12:09
@@ -438,11 +438,16 @@
{
abort ();
}
- if (num <= 0)
+ if (num < 0)
{
- /* Zero is used as an end marker in the file. */
as_bad (_("Line numbers must be positive integers\n"));
return;
+ }
+ else if (num == 0)
+ {
+ /* Zero is used as an end marker in the file. */
+ as_warn (_("Line numbers must be positive integers\n"));
+ num = 1;
}
new_line->next = line_nos;
new_line->frag = frag;
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{lsd.ic.unicamp.br,guarana.{org,com}} aoliva@{acm,computer}.org
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them