This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

.debug_ranges handling in gcc


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]