[Dwarf-Discuss] imported_unit and reference identity

Chris Quenelle Chris.Quenelle at Sun.COM
Thu Jan 22 10:06:34 PST 2009


I just re-read E.2.3 and I believe it's accurate.
(Assuming you have all the same implicit definitions
that I have in my head. :-) I won't claim it should clear
to everyone.)   I don't think I was contradicting it.

If you assume that header files are the things being
factored or commonized then I think E.2.3 says:

The top-level units describing header files should
be partial_units and not compile_units because the
header file definitions are not visible to the
scope of all object files.  The compile_unit blocks
for object files which include this header should have
have references to this partial_unit.

Making sure that a partial_unit represents a truly
common interpretation of a header file can be
done using content-hashes.  If the same header
produces different type information because
of differently defined CPP symbols in the 
surrounding context, then multiple different
partial_units need to be generated, and the proper
variant should be referenced from the the right
compile_units.

--chris






Roland McGrath wrote:
>> The short answer is:
>> If you want to combine type information that is in different parts
>> of the visible scope tree, then you really should disable it
>> if there are direct references to that type information.
>>
>> I think most of the discussion in Appendix E relates to
>> combining type information that is actually the exact
>> same type, but it would otherwise be recorded multiple
>> times in executable.  In this sense, A::foo and B::foo are
>> not the exact same type.  They have the same shape, but
>> they are not the same type.
> 
> Back to the unanswered question: So then what is E.2.3 talking about?
> 
> It sounds like you are saying E.2.3 is entirely bogus, but noone has
> mentioned changing its wording.
> 
> 
> Thanks,
> Roland
> _______________________________________________
> Dwarf-Discuss mailing list
> Dwarf-Discuss at lists.dwarfstd.org
> http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org




More information about the Dwarf-Discuss mailing list