This is the mail archive of the binutils@sourceware.cygnus.com 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]

Re: Dwarf reader error from ld


   Date: Wed, 12 Jan 2000 18:42:44 -0600
   From: Eric DeVolder <devolder@evsx.com>

   I'm porting binutils (and tweaking gcc) to a new 64bit architecture. I'm
   getting the following error message from ld during linking when it
   attempts to use a module in a library archive (libgcc.a in this case):

   -------------------------------------
   /usr/local/comp/e3/gcc/e3-elf/bin/ld: Dwarf Error: found dwarf version
   '0' in compilation unit 'ta?}H
		       Xs ', this reader only handles version 2
   information.

These errors are appearing when the linker tries to get line number
information for an error report.

   libgcc1-test.o(.text+0xf8): undefined reference to `__divsi3'

These errors mean that these symbols are not defined anywhere.  This
has nothing to do with any DWARF issue.

   As far as I can tell, the source file looks okay [snippet of gcc -S
   below]. Admittedly, I'm not very familiar with Dwarf2, so i an be
   thrashed if this is the problem...

Do you override find_nearest_line in your BFD backend?  If you don't,
the linker will think it should be reading 4 byte addresses from the
DWARF debugging info.  You are giving it 8 byte addresses, so that
won't work.  You can pass the last argument of
_bfd_dwarf2_find_nearest_line as 8 to tell it to use 8 byte addresses.

I'm not sure why the DWARF information itself does not record this.

   Because it is assembling ok, it appears as if binutils is correctly
   handling Dwarf2 (ptr size is 8).

This doesn't really prove anything.  The assembler does not parse the
DWARF information at all.  It just writes it to the file.

Ian

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