remove remnants of old Mach-O workaround
I happened to run readelf on an ELF file created by Guile. readelf
complained about invalid values for DW_FORM_strp. At first I assumed
this was just a Guile bug, but eu-readelf did the right thing, so I
looked a bit deeper.
I came across some old Mach-O code to bias some offsets by section
addresses. Guile, unlike many ELF writers, sets the address for the
various DWARF-related sections, causing this unusual code to be run.
This code came from an old commit:
2005-09-30 H.J. Lu <hongjiu.lu@intel.com>
* dwarf.c (fetch_indirect_string): Adjust for section address.
(process_debug_info): Likewise.
(display_debug_loc): Likewise.
(display_debug_ranges): Likewise.
* objdump.c (mach_o_dwarf_sections): New.
(generic_dwarf_sections): Likewise.
(check_mach_o_dwarf): Likewise.
(dump_dwarf): Call check_mach_o_dwarf.
However it was partially reverted here:
https://sourceware.org/ml/binutils/2008-11/msg00134.html
This patch just completes the reversion.
Built and regtested on x86-64 Fedora 18. I also ran the resulting
readelf against the Guile-created object with success.
I have no way of testing this on Mach-O, so your feedback is
solicited.
2013-12-19 Tom Tromey <tromey@redhat.com>
* dwarf.c (fetch_indirect_string): Don't bias by section address.
(fetch_indexed_string): Likewise.
(process_debug_info): Likewise.
(display_debug_loc): Likewise.
(display_debug_ranges): Likewise.