From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25470 invoked by alias); 11 Mar 2006 01:44:59 -0000 Received: (qmail 25461 invoked by uid 22791); 11 Mar 2006 01:44:58 -0000 X-Spam-Check-By: sourceware.org Received: from xproxy.gmail.com (HELO xproxy.gmail.com) (66.249.82.195) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 11 Mar 2006 01:44:56 +0000 Received: by xproxy.gmail.com with SMTP id t11so591789wxc for ; Fri, 10 Mar 2006 17:44:54 -0800 (PST) Received: by 10.70.102.14 with SMTP id z14mr1604293wxb; Fri, 10 Mar 2006 17:44:54 -0800 (PST) Received: by 10.70.125.17 with HTTP; Fri, 10 Mar 2006 17:44:53 -0800 (PST) Message-ID: <8f2776cb0603101744w3dd59741s4ad8e17b7069a6fa@mail.gmail.com> Date: Sun, 12 Mar 2006 07:58:00 -0000 From: "Jim Blandy" To: binutils@sourceware.org, gdb-patches@sourceware.org Subject: Re: linker debug info editing In-Reply-To: <20060310124921.GN6777@bubble.grove.modra.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20060310124921.GN6777@bubble.grove.modra.org> 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/msg00170.txt.bz2 After you've chosen dies to delete, how do you deal with other dies that refer to the deleted dies? I'm not talking about parents; I'm talking about attributes whose form is DW_FORM_ref*. I think the information we need to do this reduction correctly isn't available at the level you're working at. linkonce sections aren't really deleted; they're unified. The data in them doesn't go away; equivalent data from elsewhere is used instead. I tend to think that having the compiler divide the information into separate compilation units, as Jim suggests, is the only way to go here. In that scenario, inter-CU references will use symbols to refer to their targets; after choosing which instance of the linkonce section to keep, you should still have definitions for all the symbols the other dies' relocs refer to. As Daniel says, the GDB-related reasons for avoiding this solution are long gone.