Target-specific FDE pointer sizes (2/3)

Nick Clifton nickc@redhat.com
Mon Jan 31 11:17:00 GMT 2005


Hi Richard,

> As with the bfd patch, we need to distinguish between the official
> LP64 ABI and the not-so-official ILP32 variant.  In the case of bfd,
> it was important that we get the size right, and we had to punt if
> we weren't sure.  In the case of readelf, I think we just want a
> "best guess", since we have to output _something_.

I think that if readelf has to guess it should inform the user that it 
is doing so.  That way the user has a chance to realise that readelf 
might have guessed incorrectly and that is why its output does not match 
their expectations.

> binutils/
> 	* readelf.c (eh_addr_size): New variable.
> 	(find_section): Move earlier in file.  Return empty sections too.
> 	(process_program_headers): Use find_section to find .dynamic.
> 	(process_section_headers): Initialize eh_addr_size.
> 	(dump_ia64_unwind, slurp_ia64_unwind_table, ia64_process_unwind)
> 	(dump_hppa_unwind, slurp_hppa_unwind_table, hppa_process_unwind)
> 	(display_debug_frames): Use it instead of local addr_size variable.
> 	(size_of_encoded_value): Get pointer size from eh_addr_size rather
> 	than is_32bit_elf.

Approved - with the addition of a warning message when readelf is forced 
to guess.

Cheers
   Nick



More information about the Binutils mailing list