ld: Dwarf Error: Offset

M R Swami Reddy MR.Swami.Reddy@nsc.com
Mon Nov 17 12:02:00 GMT 2008


Hello,
With a simple test case like below:
===test.c==
#include <stdio.h>

extern int foo ;
int main()
{
    foo = 1 ;
}
===

 > cr16-elf-gcc test.c -g -O2 -c  // Compile with -O2 -g options
 > cr16-elf-ld 6.o
cr16-elf-ld: Dwarf Error: Offset (150) greater than or equal to (null) size 
(135098772).
6.o: In function `main':
  char/6.c:9: undefined reference to `foo'
==

NOTE: When I compile with -O1 or above optimization option the above DWARF error 
observed.

Could please suggest on this issue? Is it issue with compiler (ie gcc) or linker 
(ie ld)?

I am using the gcc-4.2.4 and binutils-2.19 tools.

Thanks
Swami




More information about the Binutils mailing list