This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
MIPS64 -msym32 and DWARF2_ADDR_SIZE
- From: Adam Nemet <anemet at caviumnetworks dot com>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 30 Jan 2009 18:54:02 -0800
- Subject: MIPS64 -msym32 and DWARF2_ADDR_SIZE
-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