From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26758 invoked by alias); 10 Mar 2006 20:04:22 -0000 Received: (qmail 26735 invoked by uid 22791); 10 Mar 2006 20:04:21 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Fri, 10 Mar 2006 20:04:20 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FHnqP-0007vm-UO; Fri, 10 Mar 2006 15:04:14 -0500 Date: Fri, 10 Mar 2006 20:16:00 -0000 From: Daniel Jacobowitz To: James E Wilson Cc: Alan Modra , binutils@sourceware.org, gdb-patches@sourceware.org Subject: Re: linker debug info editing Message-ID: <20060310200413.GA30219@nevyn.them.org> Mail-Followup-To: James E Wilson , Alan Modra , binutils@sourceware.org, gdb-patches@sourceware.org References: <20060310124921.GN6777@bubble.grove.modra.org> <1142020201.13901.29.camel@aretha.corp.specifix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1142020201.13901.29.camel@aretha.corp.specifix.com> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-03/txt/msg00166.txt.bz2 On Fri, Mar 10, 2006 at 11:50:01AM -0800, James E Wilson wrote: > On Fri, 2006-03-10 at 04:49, Alan Modra wrote: > > This is a first pass at debug info editing to remove bogus entries for > > link-once functions. > > There is an equivalent gcc solution we could consider. Create a > separate compilation unit die for each linkonce function. We could use > section groups to tie the debug info to the linkonce function, so that > the debug info disappears along with the function. You have to finish enabling COMDAT support everywhere, in order to do this; we (CodeSourcery) tried when it was contributed, but kept encountering oddball problems on different platforms. > We already have a similar scheme in use for header files, that mirrors > the BINCL/EINCL stabs support. This was one of the new features that > went into the DWARF3 standard. Unfortunately, this code is not the > default yet. You have to specify -feliminate-dwarf2-dups to get it. I > think there was some gdb work that needed to be done to complete the > project, and us gcc developers aren't very good at volunteering to do > gdb work. I made the required changes, a year and a half ago or thereabouts. > If we do need link time editing of dwarf2 debug info, there is a lot of > useful stuff that could be done here, such as eliminating duplicate > debug_abbrev entries. This is probably more complicated than what you > are attempting here though, but it could perhaps be added later on top > of your work. There's quite a lot of compression that we could do at link time if we're going to process DIEs at all. I think this would be a worthwhile thing to do, and it requires something like Alan's done (although I haven't looked at the patch yet). -- Daniel Jacobowitz CodeSourcery