This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: .debug_ranges handling in gcc
- From: Jakub Jelinek <jakub at redhat dot com>
- To: rth at redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 11 Dec 2001 14:33:00 +0100
- Subject: Re: .debug_ranges handling in gcc
- References: <20011211140251.C1017@sunsite.ms.mff.cuni.cz>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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