Re: Mixing 32-bit and 64-bit DWARF2/3 sections

Daniel Berlin
2004-11-08T23:50:44Z

On Tue, 9 Nov 2004, Thiemo Seufer wrote:

> James E Wilson wrote:
> [snip]
>> Besides the technical details, you will also need to get political buy
>> in from affected parties for an ABI change, which means mainly the
>> GNU/Linux mips64 folks.
>
> FWIW, I doubt going back unconditionally to a 32bit format is the right
> thing to do for a fully 64bit ABI. Applications tend to grow further,
> as does the accompanying debug info, so the 32bit limit comes closer.

DWARF3, which is what gcc emits, is 32 bit by "default", but if it
became necessary, it (DWARF3) supports 64 bit sizes/offsets/etc and can
output
them.

The main difference between SGI's 64 bit-only dwarf2, and DWARF3's
64bit dwarf2 is that DWARF3 allows you to mix 32 bit and 64 bit
compilation units ( you just can't mix 32 bit and 64 bit *in* a single
compilation unit).
SGI doesn't allow you to do this.

DWARF3 accomplishes this by using a 32 bit 0xffffffff as the
initial length in the compilation unit to signal that this is really 64
bit, which is followed by a 64 bit real length.

SGI does no such thing, they simply use a 64 bit initial length, which
means you don't know whether you have 32 bit or 64 bit unless the ABI
tells you it must be one or the other.

In short, there is no limitation in dwarf3 that SGI is solving.
It's just a matter of them not solving it in a backwards compatible way,
and everyone else paying the consequences :)

--Dan