Actions

icon Post
text/html Subscribe
text/html Unsubscribe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Placement of vtables, inlines and such


  • To: Daveed Vandevoorde <daveed@xxxxxxx>
  • Subject: Re: Placement of vtables, inlines and such
  • From: Jason Merrill <jason@xxxxxxxxxx>
  • Date: 24 Jun 1999 23:14:52 -0700

>>>>> Daveed Vandevoorde <daveed@xxxxxxx> 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