.debug_ranges handling in gcc
Jakub Jelinek
jakub@redhat.com
Tue Dec 11 06:12:00 GMT 2001
On Tue, Dec 11, 2001 at 02:02:51PM +0100, Jakub Jelinek wrote:
> Hi!
>
> GCC uses absolute .debug_ranges offsets:
> .long 0x18 # DW_AT_ranges
> ...
> .section .debug_ranges,"",@progbits
> ...
> .long .LBB6-.Ltext0 # Offset 0x18
> .long .LBE6-.Ltext0
> .long .LBB12-.Ltext0
> .long .LBE12-.Ltext0
> .long 0x0
> .long 0x0
>
> I don't see how this can work in presence of multiple input .debug_ranges
> section during the link. DW_AT_ranges will be correct for the first object
> file using .debug_ranges only.
> Shouldn't we use some .L* labels instead, so that they are turned into
> section relative relocs (on IA-64, otherwise assuming .debug_ranges will
> have VMA 0 when relocatable)?
> I can cook up a patch if you agree...
Actually, just using .Ldebug_ranges+offset and adding .Ldebug_ranges:
before first ranges in .debug_ranges section would be enough (and would
require minimal changes in dwarf2out.c).
Jakub
More information about the Gcc
mailing list