[cxx-abi-dev] comparing type_infos (was Re: Patch for throw/catch problems)

Jason Merrill jason_merrill at redhat.com
Wed Aug 15 10:01:31 UTC 2001


>>>>> "Jakub" == Jakub Jelinek <jakub at redhat.com> writes:

> What could trim the conflict list down substantially would be some kind of
> lazy virtual methods if the ABI would allow that (something similar to PLTs
> for function calls), but with the difference that once resolved, it could be
> written back into virtual table, so further virtual method calls would see
> no performance slowdown. This way the relocation would be done only when
> some virtual table is actually used, thus classes which are never used would
> never need relocation of their virtual table. But the precondition for this
> would be that no C++ program can ever read method pointers from virtual
> tables and compare them for equality.

That's OK; there is no way for a conformant C++ program to get a function
pointer out of the vtable.  A pointer to virtual member function just gives
the index in the vtable (so dynamic binding works).

Jason



More information about the cxx-abi-dev mailing list