[PATCH] Fix flag_eliminate_dwarf2_dups/flag_eliminate_unused_debug_types clash

Zdenek Dvorak rakdver@atrey.karlin.mff.cuni.cz
Tue Mar 4 07:12:00 GMT 2003


Hello,

> > > > > 	* dwarf2out.c (dwarf2out_finish): Swap break_out_includes and
> > > > > 	prune_unused_types order.
> > > > 
> > > > I guess this is ok, but I think it more useful to turn off
> > > > flag_eliminate_unused_debug_types when flag_eliminate_dwarf2_dups.
> > > 
> > > this patch puts types into their own sections in case
> > > both flag_eliminate_unused_debug_types and flag_eliminate_dwarf2_dups
> > > are used, so that they do not conflict with each other. It always does
> > > this for basic types with flag_eliminate_dwarf2_dups (they are usually
> > > defined in all object files). The results (sizes of cc1 compiled with
> > > various flag combinations):
> 
> Also, it looks like this patch created a compilation unit per type. 
> If I'm right, that's the point at which I think we're really abusing
> (instead of using) linkonce sections; this should just be implemented
> in the linker.
> 
> I'm told that with libdwarf, this is not particularly complicated to
> implement.

probably; and yes, it would be best if linker did true dwarf2 dups removal.
But the only time I have seen ld from inside was when I was checking how
linkonce sections work, and my impression was that I don't want touch it
as long as it works :-(

Zdenek



More information about the Gcc-patches mailing list