From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11108 invoked by alias); 13 Mar 2006 06:23:41 -0000 Received: (qmail 11092 invoked by uid 22791); 13 Mar 2006 06:23:40 -0000 X-Spam-Check-By: sourceware.org Received: from CPE-144-136-172-108.sa.bigpond.net.au (HELO grove.modra.org) (144.136.172.108) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 13 Mar 2006 06:23:38 +0000 Received: by bubble.grove.modra.org (Postfix, from userid 500) id 46A5E1DC28D; Mon, 13 Mar 2006 16:53:35 +1030 (CST) Date: Mon, 13 Mar 2006 20:19:00 -0000 From: Alan Modra To: Daniel Berlin Cc: Jim Blandy , binutils@sourceware.org, gdb-patches@sourceware.org Subject: Re: linker debug info editing Message-ID: <20060313062335.GR6777@bubble.grove.modra.org> Mail-Followup-To: Daniel Berlin , Jim Blandy , binutils@sourceware.org, gdb-patches@sourceware.org References: <20060310124921.GN6777@bubble.grove.modra.org> <8f2776cb0603101744w3dd59741s4ad8e17b7069a6fa@mail.gmail.com> <1142217868.20401.15.camel@linux.site> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1142217868.20401.15.camel@linux.site> User-Agent: Mutt/1.4i 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/msg00178.txt.bz2 On Sun, Mar 12, 2006 at 09:44:27PM -0500, Daniel Berlin wrote: > On Fri, 2006-03-10 at 17:44 -0800, Jim Blandy wrote: > > 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*. > > The only correct answer to this is "rewrite all the references all > starting from scratch" :P Yes, that's the conclusion I was coming to.. It's a pain. All the offsets can change, and in some cases there can even be an increase. eg. rewriting a DW_FORM_ref2 as a DW_FORM_ref_addr, to point at the proper info (that for the kept function). I think all the info is there for ld to do this, but it's quite a lot more work than I realized. When I started, I knew more about how to do this in ld than what actually needed doing. :) -- Alan Modra IBM OzLabs - Linux Technology Centre