-msym32 changes DWARF's address_size from 64 bits to 32 bits.  This means that
while symbols are 64-bit (due to ELF64), target addresses in the debug info
are 32-bit.

There is support for this in DWARF of course in fact you can specify different
address_size for each compilation unit which nicely maps with -msym32 being
link-compatible with regular N64 objects.

However, this asymmetry exposed several bugs in binutils.  Also, as I just
discovered today, dwarfdump (libdwarf) has no support for changing the
address_size between compilation units and in fact derives address_size from
the ELF class (ELF64/ELF32).  (Obviously, that's a bug in libdwarf.)

So my question is whether the saving in the size of the debug info with
-msym32 is really worth the trouble here or should we just start generating
64-bit addresses with -msym32?

Adam

Reply via email to