This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: linker debug info editing
- From: "Jim Blandy" <jimb at red-bean dot com>
- To: binutils at sourceware dot org, gdb-patches at sourceware dot org
- Date: Fri, 10 Mar 2006 17:44:54 -0800
- Subject: Re: linker debug info editing
- References: <20060310124921.GN6777@bubble.grove.modra.org>
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.