This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Use comdat sections to reduce the size of debug info


Hi,

On Fri, 15 Aug 2008, Cary Coutant wrote:

> I've proposed an extension to the DWARF-4 format to support the
> ability to place individual type definitions in separate comdat
> .debug_types sections. See the wiki page on the DWARF website for
> background and details:
> 
>   http://wiki.dwarfstd.org/index.php?title=COMDAT_Type_Sections

Why introduce new forms (sig4 and sig8)?  As you need 4 or even 8 bytes 
anyway you can as well refer to the section containing the type directly 
(the .o files would contain an relocation to the appropriate 
.debug_types.FOO section which is processed by the linker with a reference 
to that sections offset (or to the one it was discarded for) in the final 
.debug_type section).

This would also obviate the need of a sig-to-type mapping in DWARF 
processors.

I don't like the length of the proposed "type unit header".  It's about 26 
byte but doesn't contain very interesting information in the finally 
linked object.  At the very least I would make the odr_signature optional 
(use a bit in version to flag it's existence).  In the finally linked 
executable I would try to get rid of this whole header.  With the above 
idea of not using the signature as reference you don't need them in the 
header.  As far as I can see only the type offset field would be needed in 
the final executable (type references would refer to that field by section 
offset, and references from inside that DIE tree would be relative to the 
offset of that field).


Ciao,
Michael.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]