On Thu, Jul 13, 2006 at 01:36:46AM +0200, Gabriel Dos Reis wrote:
> So, -concretely- what happens to a class S (e.g. associated type info object
> address, address of member functions, etc.) with external linkage,
> defined in multiple translation units, with say hidden visibility?

Well, there are the C++ rules, and then there are the ELF rules.  At the
object code level we have only symbol definitions (corresponding to
the addresses of member functions, virtual tables, and typeinfo). If
the relevant symbols are hidden, then it's as if they aren't there, so
we can violate the one-definition rule.  We can have two distinct
classes named S, and no one can tell.  Each bit of code will see one
definition of S.


Reply via email to