Placement of vtables, inlines and such

Jason Merrill jason at cygnus.com
Fri Jun 25 06:14:52 UTC 1999


>>>>> Daveed Vandevoorde <daveed at edg.com> writes:

 > Jason Merrill wrote:
 >> No.  gc works by sweeping from main, finding all the referenced symbols;
 >> any sections that haven't provided any symbols are discarded.  If we use
 >> weak symbols for vtables and put them in separate sections, gc will keep at
 >> most one copy, as needed.  There is no notion of a special symbol.

 > How does this work in shared libraries? Is GC done at load time?

As I understand it, yes.

 >> This does bring up another issue; handling initialization.  g++ handles
 >> initialization of a weak/COMDAT object by emitting a sentry along with it,
 >> which gets set when the object has been initialized.

 > Do you thread-protect it? (just curious)

Nope.  We don't currently do anything to thread-protect initializers.

Jason




More information about the cxx-abi-dev mailing list