This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

ld: Dwarf Error: Offset


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



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