public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* .debug_ranges handling in gcc
@ 2001-12-11  5:31 Jakub Jelinek
  2001-12-11  6:12 ` Jakub Jelinek
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2001-12-11  5:31 UTC (permalink / raw)
  To: rth; +Cc: 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: .debug_ranges handling in gcc
  2001-12-11  5:31 .debug_ranges handling in gcc Jakub Jelinek
@ 2001-12-11  6:12 ` Jakub Jelinek
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Jelinek @ 2001-12-11  6:12 UTC (permalink / raw)
  To: rth; +Cc: gcc

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-12-11 13:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-11  5:31 .debug_ranges handling in gcc Jakub Jelinek
2001-12-11  6:12 ` Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).