This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Symbol Separation - Debugging
On Wed, 2 Jul 2003 14:39:57 -0400, Daniel Jacobowitz <drow@mvista.com> wrote:
> On Wed, Jul 02, 2003 at 01:55:08PM -0400, Jason Merrill wrote:
>> On Wed, 2 Jul 2003 12:21:49 -0400, Daniel Jacobowitz <drow@mvista.com> wrote:
>>
>> > On Wed, Jul 02, 2003 at 12:05:26PM -0400, Jason Merrill wrote:
>>
>> >> The -feliminate-dwarf2-dups code separates out debug info for a particular
>> >> header into a separate compilation unit, and uses symbolic references to
>> >> get at it. Duplicates are eliminated using .linkonce.
>> >
>> > Right; the difference between that code and this is that the references
>> > are in the same object file, so we can use DW_FORM_ref.
>>
>> Hmm? With .linkonce processing the refs will only be in the same object
>> file for one object file. And in any case, the references aren't in the
>> same CU, so we need to use DW_FORM_ref_addr.
>
> I don't think we're talking about the same thing. I was talking about
> Devang's patch: you build the debug information for the header once,
> and then that header doesn't go through dwarf2out when you compile a
> file which includes the header. Saves time and object file size, not
> just final binary size, which is what the .linkonce is for.
Sure. My point is that with both my scheme and Devang's, you need to use
DW_FORM_ref_addr to refer to the debug info for the header from files that
include it.
The only difference is between emitting the info everywhere and then
throwing away all but one copy vs. only emitting it once.
Jason