Debug info for comdat functions

Jason Merrill
Thu Apr 19 12:05:00 GMT 2012

On 04/18/2012 07:40 PM, Cary Coutant wrote:
> Nice -- I've been wanting to do that for a while, but I always thought
> it would be a lot harder. I see that you've based this on the
> infrastructure created for -feliminate-dwarf2-dups. I don't think that
> will play nice with -fdebug-types-section, though, since I basically
> made those two options incompatible with each other by unioning
> die_symbol with die_type_node.

I think it should be OK because I wait until after the debug_types 
processing is done, at which point limbo_die_list is empty.  Or am I 
just not seeing the problem?

> In the HP-UX compilers, we basically put a complete set of .debug_*
> sections in each COMDAT group, and treated the group as a compilation
> unit of its own (not a partial unit).

So you copy anything that the function refers to into the CU for the 

> wasteful in terms of object file size). Readelf and friends will need
> to be taught how to find the right auxiliary debug sections, though --
> they currently have a built-in assumption that there's only one of
> each.

Good to know.


More information about the Binutils mailing list