This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

eh_addr_size (global variable)


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?)

J'


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]