https://sourceware.org/bugzilla/show_bug.cgi?id=32927
Bug ID: 32927
Summary: readelf --dwarf-check --debug-dump=Ranges produces
nonsense warnings for DWARF 4 and DWARF5
Product: binutils
Version: 2.45 (HEAD)
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: hmeyer.eu at gmail dot com
Target Milestone: ---
example output from --dwarf-check --debug-dump=Ranges:
DWARF4/debug_ranges:
Offset Begin End
00000000 00000000000036d4 00000000000036d4 (start == end)
00000000 00000000000036d8 00000000000036dc
00000000 <End of list>
readelf: Warning: There is a hole [0 - 0x30] in .debug_ranges section.
00000030 00000000000036d4 00000000000036d8
00000030 00000000000036dc 00000000000036e5
00000030 <End of list>
readelf: Warning: There is a hole [0x30 - 0x60] in .debug_ranges section.
00000060 0000000000003704 0000000000003704 (start == end)
00000060 0000000000003708 000000000000370c
00000060 <End of list>
readelf: Warning: There is a hole [0x60 - 0x90] in .debug_ranges section.
00000090 0000000000003704 0000000000003708
00000090 000000000000370c 0000000000003715
00000090 <End of list>
DWARF5/debug_rnglists:
Offset Begin End
0000000c 00000000000036d4 (base address)
00000015 00000000000036d4 00000000000036d4 (start == end)
00000018 00000000000036d8 00000000000036dc
0000001b <End of list>
readelf: Warning: There is a hole [0xc - 0x1c] in .debug_rnglists section.
0000001c 00000000000036d4 (base address)
00000025 00000000000036d4 00000000000036d8
00000028 00000000000036dc 00000000000036e5
0000002b <End of list>
readelf: Warning: There is a hole [0x1c - 0x2c] in .debug_rnglists section.
0000002c 0000000000003704 (base address)
00000035 0000000000003704 0000000000003704 (start == end)
00000038 0000000000003708 000000000000370c
0000003b <End of list>
The hole check always triggers, even if the other output shows that there are
no holes.
If the hole check triggers, it prevents the overlap check from triggering, even
if there are overlaps. However, it is normal for compilers (GCC 13 and later)
to produce overlapping rangelists in debug_rnglists as noted in the discussion
of bug 30792.
readelf --dwarf-check --debug-dump=Ranges seems to be broken for all versions
since 2.35, which is the oldest I tested (debian oldstable).
I have not attached a binary, it seems to be wrong for all inputs.
--
You are receiving this mail because:
You are on the CC list for the bug.