This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
ld: Dwarf Error: Offset
- From: "M R Swami Reddy" <MR dot Swami dot Reddy at nsc dot com>
- To: binutils at sources dot redhat dot com
- Date: Mon, 17 Nov 2008 17:32:25 +0530
- Subject: 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