https://sourceware.org/bugzilla/show_bug.cgi?id=30835
Bug ID: 30835 Summary: [readelf] Incorrect warning with .gnu_debugaltlink (.debug_info offset in .debug_aranges section does not point to a CU header) Product: binutils Version: 2.42 (HEAD) Status: NEW Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- I was using readelf to look at the executables in the gdb testcase gdb.dwarf2/dwzbuildid.exp, and ran into a warning: ... $ ~/binutils/install/bin/readelf -w ./leap-15-4/build/gdb/testsuite/outputs/gdb.dwarf2/dwzbuildid/dwzbuildid-ok > READELF readelf: Warning: .debug_info offset of 0x2e in .debug_aranges section does not point to a CU header. ... The .debug_aranges section where the warning originates is shown here: ... Contents of the .debug_aranges section (loaded from /data/vries/gdb/leap-15-4/build/gdb/testsuite/outputs/gdb.dwarf2/dwzbuildid/dwzbuildid3.o): Length: 28 Version: 2 Offset into .debug_info: 0 Pointer Size: 8 Segment Size: 0 Address Length 0000000000000000 0000000000000000 Length: 28 Version: 2 Offset into .debug_info: 0x2e Pointer Size: 8 Segment Size: 0 Address Length 0000000000000000 0000000000000000 ... and the corresponding .debug_info section is: ... Contents of the .debug_info section (loaded from /data/vries/gdb/leap-15-4/build/gdb/testsuite/outputs/gdb.dwarf2/dwzbuildid/dwzbuildid3.o): Compilation Unit @ offset 0: Length: 0x7 (32-bit) Version: 4 Abbrev Offset: 0 Pointer Size: 8 Compilation Unit @ offset 0xb: Length: 0x1f (32-bit) Version: 4 Abbrev Offset: 0x1 Pointer Size: 8 <0><16>: Abbrev Number: 2 (DW_TAG_compile_unit) <17> DW_AT_language : 2 (non-ANSI C) <1><18>: Abbrev Number: 3 (DW_TAG_base_type) <19> DW_AT_name : int <1d> DW_AT_byte_size : 4 <1e> DW_AT_encoding : 5 (signed) <1><1f>: Abbrev Number: 4 (DW_TAG_constant) <20> DW_AT_name : the_int <28> DW_AT_type : <0x18> <2c> DW_AT_const_value : 99 <1><2d>: Abbrev Number: 0 Compilation Unit @ offset 0x2e: Length: 0x7 (32-bit) Version: 4 Abbrev Offset: 0x1f Pointer Size: 8 ... There seems to be a CU at 0x2e, so the warning looks incorrect. When using readelf directly on the .gnu_debugaltlink file (dwzbuildid3.o), the warning is not there. -- You are receiving this mail because: You are on the CC list for the bug.