Summary: | readelf --debug-dump=Ranges doesn't handle concatenated .debug_rnglists sections | ||
---|---|---|---|
Product: | binutils | Reporter: | Simon Marchi <simark> |
Component: | binutils | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | simon.marchi |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Attachments: | ELF file containing .debug_rnglists |
Description
Simon Marchi
2021-06-25 15:55:52 UTC
Created attachment 13512 [details]
ELF file containing .debug_rnglists
Apparently fixed with current binutils. 000004e2 00000000000a35a0 00000000000a35b3 000004ec <End of list> Table at Offset: 0x4ed: Length: 0x7c DWARF version: 5 Address size: 8 Segment size: 0 Offset entries: 0 Offset Begin End 000004f9 00000000000a35d4 (base address) 00000502 00000000000a35d4 00000000000a35d7 Cool, thanks! I had to bisect to know which commit fixed it, it's this one: e7f024765a48fba4452535a5fc006a7e858730fd is the first new commit commit e7f024765a48fba4452535a5fc006a7e858730fd Author: Alan Modra <amodra@gmail.com> Date: Sun Oct 17 17:34:46 2021 +1030 PR28459, readelf issues bogus warning I'd missed the fact that the .debug_rnglists dump doesn't exactly display the contents of the section. Instead readelf rummages through .debug_info looking for DW_AT_ranges entries, then displays the entries in .debug_rnglists pointed at, sorted. A simpler dump of the actual section contents might be more useful and robust, but it was likely done that way to detect overlap and holes. Anyway, the headers in .debug_rnglists besides the first are ignored, and limiting to the unit length of the first header fails if there is more than one unit. PR 28459 * dwarf.c (display_debug_ranges): Don't constrain data to length in header. binutils/dwarf.c | 1 - 1 file changed, 1 deletion(-) |