RFC: Change of dw2 DWARF_OFFSET_SIZE on 64-bit to POINTER_SIZE

Jakub Jelinek jakub@redhat.com
Wed Aug 27 20:05:00 GMT 2008


On Tue, Aug 26, 2008 at 01:51:19PM -0400, NightStrike wrote:
> On 8/1/08, Kai Tietz <Kai.Tietz@onevision.com> wrote:
> > Hello,
> >
> > The default value of DWARF_OFFSET_SIZE of 4 is for w64 a problem, because
> > on w64 there are only 64-bit imaged based relocations present and the
> > offset is build of this offset is computed by a secrel offset.
> > Additionally there is no way for this target to set VA to zero as done for
> > elf. I prepared a patch for binutils to change this behaviour. As we
> > discussed is the additional memory consume for 64-bit less, so I want to
> > query if there is general agreement in changing this value in general for
> > 64-bit targets?
> > These should affect DW_AT_stmt_list and the arange to use 8 byte offset
> > for 64-bit targets.
> >
> > The change would be in dwarf2out.c and looks like:
> > ....
> >  /* The size in bytes of a DWARF field indicating an offset or length
> >    relative to a debug info section, specified to be 4 bytes in the
> >    DWARF-2 specification.  The SGI/MIPS ABI defines it to be the same
> >    as PTR_SIZE.  */
> >
> >  #ifndef DWARF_OFFSET_SIZE
> > -#define DWARF_OFFSET_SIZE 4
> > +#define DWARF_OFFSET_SIZE (TARGET_64BIT ? 8 : 4)
> >  #endif...
> >
> > As I discussed with binutils, they would be happy to change this, if gcc
> > would change its behaviour, too.
> 
> I haven't seen a response on this yet.  Have I missed it?

All the world isn't W64, and just because one 64-bit target isn't able to
use it doesn't mean we want to punish all 64-bit targets by enlarging the
debug info.  So, please do it for W64 only if you have to.

	Jakub



More information about the Gcc-patches mailing list