www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/08/12/03:14:32

Date: Mon, 12 Aug 2002 10:11:33 +0300 (WET)
From: Andris Pavenis <pavenis AT lanet DOT lv>
X-Sender: pavenis AT ieva06
To: "Mark E." <snowball3 AT softhome DOT net>
Cc: djgpp-workers AT delorie DOT com, binutils AT sources DOT redhat DOT com
Subject: Re: Problem with DWARF2 debug info for DJGPP
In-Reply-To: <3D53E424.21319.1043736@localhost>
Message-ID: <Pine.A41.4.05.10208121008340.4962-100000@ieva06>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com


On Fri, 9 Aug 2002, Mark E. wrote:

> > I'm getting error message about wrong DWARF2 abbrev when attemting to link 
> > program which contains reference to unresolved symbol 
> 
> If you could provide a simple testcase, I'll look into it...
> 

Ok. Here is simple testcase. I run it under Linux using cross-compiler
(simply Linux is booted now), but it's reproducible also with native tools
for DJGPP.

Andris

---------------------  Test example ------------------------------
#! /bin/sh
i586-pc-msdosdjgpp-gcc -gdwarf-2 -v -x c - -o foo.exe << 'EOF'
#include <stdio.h>
int foo (void);
int main (void)
{
   return foo ();
}
EOF
-------------------------------------------------------------------

Output:

Reading specs from /usr/lib/gcc-lib/i586-pc-msdosdjgpp/3.1/specs
Configured with: ../gnu/gcc-3.1/configure --build=i586-pc-linux-gnu --host=i586-pc-linux-gnu --target=i586-pc-msdosdjgpp --with-as=/usr/bin/i586-pc-msdosdjgpp-as --with-ld=/usr/bin/i586-pc-msdosdjgpp-ld --disable-nls --prefix=/usr --enable-languages=c,c++,f77,objc --enable-version-specific-runtime-libs
Thread model: single
gcc version 3.1
 /usr/lib/gcc-lib/i586-pc-msdosdjgpp/3.1/cc1 -lang-c -v -D__GNUC__=3 -D__GNUC_MINOR__=1 -D__GNUC_PATCHLEVEL__=0 -D__MSDOS__ -D__GO32__ -D__DJGPP__=2 -D__unix__ -D__MSDOS__ -D__GO32__ -D__DJGPP__=2 -D__unix__ -Asystem=msdos -Asystem=unix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i586__ -D__tune_pentium__ -DMSDOS -DGO32 -DDJGPP=2 -Dunix -remap -imacros /usr/lib/gcc-lib/i586-pc-msdosdjgpp/3.1/djgpp.ver - -quiet -dumpbase - -gdwarf-2 -version -o /tmp/cchNDUkj.s
GNU CPP version 3.1 (cpplib) (80386, BSD syntax)
GNU C version 3.1 (i586-pc-msdosdjgpp)
	compiled by GNU C version 3.1.
ignoring duplicate directory "/usr/i586-pc-msdosdjgpp/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc-lib/i586-pc-msdosdjgpp/3.1/include
 /usr/i586-pc-msdosdjgpp/sys-include
End of search list.
 /usr/bin/i586-pc-msdosdjgpp-as --traditional-format -o /tmp/ccybbc1v.o /tmp/cchNDUkj.s
 /usr/lib/gcc-lib/i586-pc-msdosdjgpp/3.1/collect2 -o foo.exe /usr/lib/gcc-lib/i586-pc-msdosdjgpp/3.1/../../../../i586-pc-msdosdjgpp/lib/crt0.o -L/usr/lib/gcc-lib/i586-pc-msdosdjgpp/3.1 -L/usr/lib/gcc-lib/i586-pc-msdosdjgpp/3.1/../../../../i586-pc-msdosdjgpp/lib /tmp/ccybbc1v.o -lgcc -lc -lgcc -Tdjgpp-x.djl
/usr/bin/i586-pc-msdosdjgpp-ld: Dwarf Error: Could not find abbrev number 1.
/tmp/ccybbc1v.o(.text+0x11):<stdin>: undefined reference to `_foo'
collect2: ld returned 1 exit status

Output from 'i586-pc-msdosdjgpp-ld --version':

GNU ld version 2.12.1
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019