This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
What causes the 'BFD: Dwart Error:' ?
- From: "PRC" <panruochen at gmail dot com>
- To: "binutils" <binutils at sourceware dot org>
- Date: Tue, 11 Mar 2008 18:19:02 +0800
- Subject: What causes the 'BFD: Dwart Error:' ?
1.c
-----------------------------------------
#if 1
static char mydata1[0x2000] __attribute__(( section(".1.c") ));
#endif
int half(int x)
{
return x/2;
}
3.c
-----------------------------------------
static char mydata3[0x2000] __attribute__(( section(".3.c") ));
link.xn
-----------------------------------------
OUTPUT_ARCH(mips)
ENTRY(main)
SECTIONS
{
.text 0x80051000 :
{
*(.text)
*(.rodata*)
}
.data :
{
*(.data)
*(.sdata)
}
.bss :
{
*(.sbss)
*(.scommon)
*(.bss)
*(COMMON)
*(.1.c)
*(.2.c)
*(.3.c)
}
}
build
-----------------------------------------
sde-gcc -O0 -g -W -O0 -g -mips32r2 -EL -c -mno-abicalls -fno-pic -G0 -o 1.o 1.c
sde-gcc -O0 -g -W -O0 -g -mips32r2 -EL -c -mno-abicalls -fno-pic -G0 -o 3.o 3.c
sde-ld -r -EL -T link.xn -n -o a.out 1.o 3.o
sde-objdump -dS a.out >a.lst
BFD: Dwarf Error: found dwarf version '0', this reader only handles version 2 information.
If I comment out definition of `mydata1' in 1.c, the objdump error disappear as well.
How does this error occur?
Best Regards
PRC
2008/3/11