From: pavenis AT lanet DOT lv To: "Eli Zaretskii" Date: Sat, 16 Jun 2001 16:32:58 +0300 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Link errors with Debug switch on Cc: djgpp AT delorie DOT com Message-ID: <3B2B8A3A.1619.432328@localhost> In-reply-to: <3791-Sat16Jun2001160700+0300-eliz@is.elta.co.il> References: (message from Andris Pavenis on Sat, 16 Jun 2001 14:52:01 +0300 (WET)) X-mailer: Pegasus Mail for Win32 (v3.12c) Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 16 Jun 2001, at 16:07, Eli Zaretskii wrote: > > Date: Sat, 16 Jun 2001 14:52:01 +0300 (WET) > > From: Andris Pavenis > > > > andris AT hal:~$ i586-pc-msdosdjgpp-gcc -c -gstabs impar.c > > andris AT hal:~$ i586-pc-msdosdjgpp-nm impar.o > > 00000090 b .bss > > 000006f1 ? .comment > > 00000090 d .data > > 000000d0 ? .stab > > 00000310 ? .stabstr > > 00000000 t .text > > 00000090 b _imach.0 > > 00000000 T _ipmpar > > 000000c0 b _ipmpar.1 > > So the problem is still there in GCC 3.0. > > > However comparing assembler outputs with -gcoff and without it it seems > > that a bug could be in GNU assembler but not in GCC. One can try different > > binutils versions (beginning from 2.8.1 or 2.9.1) > > Ah, sorry that I didn't test different assemblers. > > I now tested with Gas from Binutils 2.10, and I still see the same > problem. Gas 2.10 is the version I tried (on another machine) with > GCC 2.7.2.1, where the problem didn't exist. > > So it looks like Gas is not the problem. But I admit that I'm not > familiar with all the details of "gcc -S" output, so perhaps I'm > missing something. > It's not a first case I met when contents of .def file in assembler source fools GAS to do something stupid. I got something similar similar recently with testing gcc-3.0 prerelease versions from CVS. Initially I workarounded problem by patching gcc/sdbout.c in gcc sources, but currently it's no more needed (gcc generates code that no more breaks GAS when -gcoff is being used). GAS incorrectly assumed external symbol to be present from COFF debug info. So it seems (my impression) that COFF related code in binutils have suffered from rather severe bitrot and have to be fixed. I haven't tested example we're talking about with current CVS version of binutils, but I'm almost sure nothing will change if I'll test ... Andris