https://sourceware.org/bugzilla/show_bug.cgi?id=27447
Bug ID: 27447 Summary: readelf does not support DWARF 5 forms Product: binutils Version: unspecified Status: NEW Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: tromey at sourceware dot org Target Milestone: --- I compiled a simple C program with "clang -g -gdwarf-5 -gpubnames". When I try to use "readelf" on it, I get some errors: readelf: Warning: Unrecognized form: 37 readelf: Warning: Unrecognized form: 37 readelf: Warning: Unrecognized form: 37 readelf: Warning: Unsupported form (DW_FORM_strx1) for attribute DW_AT_comp_dir readelf: Warning: Unrecognized form: 27 readelf: Warning: DIE at offset 0x1f refers to abbreviation number 8 which does not exist Sure enough, readelf doesn't seem to support some DWARF 5 forms: DW_FORM (DW_FORM_addrx, 0x1b) ... DW_FORM (DW_FORM_strx1, 0x25) I didn't do an exhaustive check but it's easy to see that some are missing from dwarf.c, at least read_and_display_attr_value and skip_attr_bytes ... maybe other spots as well. Strangely, to me, I get this error even with "readelf -WS". I didn't understand why this is reading DWARF forms at all. -- You are receiving this mail because: You are on the CC list for the bug.