What causes the 'BFD: Dwart Error:' ?

Jim Wilson wilson@tuliptree.org
Wed Mar 12 05:14:00 GMT 2008


PRC wrote:
> If I comment out definition of `mydata1' in 1.c, the objdump error disappear as well.
> How does this error occur?

Using __attribute__ ((section)) creates a section with data.  Your 
linker script is putting this section data into the bss section. 
However, a bss section never contains data.  Since everything will be 
forced to zero at run time, there is no point in having any actual data 
in the bss section.  Note that the file offset of the following section 
is the same as the bss section, since the bss section contains no actual 
data in the object file.

I think bfd is getting confused, trying to append data to the should- 
be-empty bss section, and accidentally overwriting the debugging info. 
This data is all zeros.  Leading zeros in the debug info will be 
ignored, until it gets to non-zero info, which will then fail to parse 
giving various curious error messages.

Jim



More information about the Binutils mailing list