This is the mail archive of the
mailing list for the GDB project.
DWARF 2 sections and padding ?
- From: Brian Ford <ford at vss dot fsi dot com>
- To: gdb at sources dot redhat dot com
- Date: Fri, 21 Feb 2003 10:16:49 -0600 (CST)
- Subject: DWARF 2 sections and padding ?
I am trying to add DWARF 2 support for PE/COFF on Cygwin. PE/COFF
sections must be aligned to 512 byte boundaries. This extra padding
confuses the DWARF 2 parsing routines because they use the sections
raw_size, thus parsing an invalid compilation unit header (all
The actual, smaller size is available in the section header. I am
confused about what the cooked_size is supposed to mean. It is currently
zero, but I think it could contain the smaller virtual size.
I have read the DWARF spec several times, and although it discusses this
issue briefly for some debugging sections, it is unclear to me how this
should really work. Unless I try to arrange for the producer (gcc) to
pad the compilation units with zeros instead of having bfd pad the end of
the sections, I don't know how to proceed.
I would like to just use an alternate size instead of the raw size (cooked
maybe?) but I don't know how this would affect other targets and I don't
want a PE specific hack in DWARF parsing code.
Any ideas? Thanks.
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems