This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: linker debug info editing
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