How to handle 64bits stabs ?
Tristan Gingold
gingold@adacore.com
Wed Sep 3 15:06:00 GMT 2008
On Sep 3, 2008, at 4:20 PM, Ian Lance Taylor wrote:
> Tristan Gingold <gingold@adacore.com> writes:
>
>> currently objdump -G (--stabs) can only display 32bits stabs.
>> However mach-o 64bits files have a 64bits
>> value field and therefore the output of objdump is bogus.
>>
>> How to deal with that ? Should we make bfd_get_arch_size working on
>> mach-o and use this function ?
>
> You would have to restrict it to Mach-O. Other 64-bit targets
> continue to use 32-bit stabs, which is arguably incorrect but is a
> backward compatibility issue. So I think the right approach is going
> to be to add a new field to the bfd_target structure. That is a
> little painful since you will have to modify all the existing
> declarations, but the runtime cost will be low.
Ok.
> My understanding is that Mach-O has switchd to DWARF anyhow.
Not completely.
Apple has (IMHO) a nice approach with debugging information. Dwarf
is now used in
object files (like on ELF) but it is kept there. The executable
doesn't contain dwarf debugging information
but only a list of object files (described in stabs). This reduce
executable size and link time.
Tristan.
More information about the Binutils
mailing list