From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5839 invoked by alias); 18 Nov 2004 08:59:09 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 5745 invoked from network); 18 Nov 2004 08:59:04 -0000 Received: from unknown (HELO gizmo09ps.bigpond.com) (144.140.71.19) by sourceware.org with SMTP; 18 Nov 2004 08:59:04 -0000 Received: (qmail 17707 invoked from network); 18 Nov 2004 08:59:02 -0000 Received: from unknown (HELO psmam12.bigpond.com) (144.135.25.103) by gizmo09ps.bigpond.com with SMTP; 18 Nov 2004 08:59:02 -0000 Received: from cpe-144-136-221-26.sa.bigpond.net.au ([144.136.221.26]) by psmam12.bigpond.com(MAM REL_3_4_2a 234/9408561) with SMTP id 9408561; Thu, 18 Nov 2004 18:59:02 +1000 Received: by bubble.modra.org (Postfix, from userid 500) id 0EEDF137079; Thu, 18 Nov 2004 19:29:01 +1030 Date: Thu, 18 Nov 2004 08:59:00 -0000 From: Alan Modra To: Nick Clifton Cc: Bob Wilson , binutils@sources.redhat.com Subject: Re: [PATCH] inconsistent DWARF2 sections generated by --gdwarf2 Message-ID: <20041118085901.GB21809@bubble.modra.org> Mail-Followup-To: Nick Clifton , Bob Wilson , binutils@sources.redhat.com References: <41990311.3060504@tensilica.com> <20041118033117.GD17083@bubble.modra.org> <419C60C8.3020501@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <419C60C8.3020501@redhat.com> User-Agent: Mutt/1.4i X-SW-Source: 2004-11/txt/msg00262.txt.bz2 On Thu, Nov 18, 2004 at 08:43:52AM +0000, Nick Clifton wrote: > Hi Alan, Hi Bob, > > >>probably harmless for GDB, but it breaks readelf, which expects a > >>one-to-one correspondence between .debug_info and .debug_line sections. > > >I would say that this is a readelf bug. The only reason that readelf > >needs .debug_info when dumping .debug_line is to find the size of > >addresses. readelf could guess that some other way. > > I do not think so - the DWARF standard does specify that there there > should be a correspondence between the compilation units in the > .debug_info section and the compilation units in the .debug_line section: > > From "Section 6.2 Line number Information": > > As mentioned in Section 3.1.1, the line number information > generated for a compilation unit is represented in the > .debug_line section of an object file and is referenced by > corresponding compilation unit debugging information entry > in the .debug_info section. But that's the other way around, .debug_info references .debug_line. In this case we have .debug_line with no .debug_info, which should be OK. -- Alan Modra IBM OzLabs - Linux Technology Centre