From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6961 invoked by alias); 11 Dec 2001 13:01:48 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 6656 invoked from network); 11 Dec 2001 13:00:22 -0000 Received: from unknown (HELO sunsite.ms.mff.cuni.cz) (195.113.19.66) by sources.redhat.com with SMTP; 11 Dec 2001 13:00:22 -0000 Received: (from jj@localhost) by sunsite.ms.mff.cuni.cz (8.9.3/8.9.3) id OAA03526; Tue, 11 Dec 2001 14:02:51 +0100 Date: Tue, 11 Dec 2001 05:31:00 -0000 From: Jakub Jelinek To: rth@redhat.com Cc: gcc@gcc.gnu.org Subject: .debug_ranges handling in gcc Message-ID: <20011211140251.C1017@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4us X-SW-Source: 2001-12/txt/msg00578.txt.bz2 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