This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
.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:02:51 +0100
- Subject: .debug_ranges handling in gcc
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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...
Jakub