Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Brian Ford <ford@vss.fsi.com>
Cc: gdb@sources.redhat.com, binutils@sources.redhat.com
Subject: Re: DWARF 2 sections and padding ?
Date: Fri, 21 Feb 2003 17:16:00 -0000	[thread overview]
Message-ID: <20030221171627.GA15165@nevyn.them.org> (raw)
In-Reply-To: <Pine.GSO.4.44.0302210931590.19283-100000@eos>

On Fri, Feb 21, 2003 at 10:16:49AM -0600, Brian Ford wrote:
> 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
> zeros).
> 
> 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.

I don't see why the raw size should include the padding; that should
just be used when _placing_ sections.  But this is a binutils/bfd
issue; redirected to that list.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2003-02-21 17:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-21 16:16 Brian Ford
2003-02-21 17:16 ` Daniel Jacobowitz [this message]
2003-02-21 18:59   ` Brian Ford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030221171627.GA15165@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=binutils@sources.redhat.com \
    --cc=ford@vss.fsi.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox