This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch] Support unordered .debug_info references to .debug_ranges
Jan Kratochvil wrote:
> This mail thread is about:
> .debug_info:
> DIE 0x0: DW_AT_ranges 0x10 (exchanged order)
> DIE 0x28: DW_AT_ranges 0x0 (exchanged order)
> .debug_ranges:
> @ 0x0: 0x60..0x70 0x80.. 0x90 0,0 (the same as in the normal case)
> @0x10: 0x70..0x80 0x100..0x110 0,0 (the same as in the normal case)
>
> While the GCC Bug was about:
> .debug_info:
> DIE 0x0: DW_AT_ranges 0x0 (the same as in the normal case)
> DIE 0x28: DW_AT_ranges 0x10 (the same as in the normal case)
> .debug_ranges:
> @ 0x0: 0x60..0x70 0x80.. 0x90 0,0 (the same as in the normal case)
> @0x10: 0x70..0x80 0x100..0x110 0x70..0x110 0,0 (overlap inside
> the same range list)
Oh, I see, it's the overall ordering of the tables, not the ordering within
one table.
> GCC could be changed (to also insert into ranges_by_label/ranges_table instead
> of just appending as being done now). But such GCC change would have no
> meaning other than workarounding this bug in readelf. DWARF has no such
> ordering requirements. So I think it is better to fix readelf.
I think you're right.
cheers,
DaveK