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_.
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.