eh_addr_size (global variable)
Wed Oct 3 11:56:00 GMT 2018
The variable eh_addr_size seems to be a global defined in dwarf.c
but set in readelf.c and objdump.c and the algorithm which sets it
seems to be inconsistent.
This came to my attention because, for s12z object files produced by
an existing third party compiler, objdump -Wf falls over badly,
whereas readelf --debug-dump=frames worked correctly.
Closer examination showed that this dwarf_info had the 24 bit addresses
(s12z has a 24 bit address space) encoded into 32 bits.
[ Arguably this is a violation of the dwarf standard, which says this
value should be "address-unit sized" ]
The following patch fixes my immediate problem, but it seems me that
there should be a more consistent way of setting this variable (should it
even be global?)
More information about the Binutils