[binutils patch] DWARF-5: readelf: .debug_names
Jan Kratochvil
jan.kratochvil@redhat.com
Sat Jun 10 07:13:00 GMT 2017
Hi Nick,
On Tue, 06 Jun 2017 15:41:15 +0200, Nick Clifton wrote:
> > binutils/ChangeLog
> > 2017-05-26 Jan Kratochvil <jan.kratochvil@redhat.com>
> >
> > * dwarf.c: Include assert.h.
> > (MAX, MIN, get_IDX_name, display_debug_names): New.
> > (debug_displays): Add .debug_names.
> > * dwarf.h: (enum dwarf_section_display_enum): Add debug_names.
> > * readelf.c (process_section_headers): Add ".debug_names".
>
> Approved - please apply.
thanks for the approval but I cannot check it in yet as it depends on:
[gcc patch] DWARF-5: Define DW_IDX_GNU_static and DW_IDX_GNU_external
https://gcc.gnu.org/ml/gcc-patches/2017-05/msg02074.html
Message-ID: <20170526181408.GA15337@host1.jankratochvil.net>
Which may additionally be changed depending on DW_IDX_* preallocation by DWARF
committee.
> > + printf (_("Version %ld\n"), (long) dwarf_version);
> > + if (dwarf_version != 5)
>
> Shouldn't this test be for >= 5 ?
0..4: Such .debug_names format has never been defined anywhere.
5: The supported version.
6..65535: Their format may/will change, I do not think readelf should attempt
decoding future unknown data format.
It is written similarly as .gdb_index version check is written:
/* Prior versions are obsolete, and future versions may not be
backwards compatible. */
if (version < 3 || version > 8)
{
warn (_("Unsupported version %lu.\n"), (unsigned long) version);
return 0;
}
Jan
More information about the Binutils
mailing list