Ann W. Harrison wrote:
> Mats,
>>
>> Correct, the linker knows zilch about C++ and virtual functions and
>> only work
>> with symbol names.
>>
>> The name mangling issue, however, does not play a role in virtual
>> function
>> calls, ...
> 
> 
> I think you may have misunderstood Jim.  What he meant was that the
> fact that virtual interfaces probably don't work across modules compiled
> with different C++ compilers is irrelevant because different compilers
> mangle names differently so the image would never start, thus never hit
> a bad virtual interface vector.  In other words, the argument that pure
> virtual interfaces aren't acceptable because they don't work in an image
> made from modules compiled with different compilers is a red herring.
> Such an image won't work at all.

Ah, not at all. I understood him perfectly. :)

The fact that the compiler mangles names does not make a difference for the
virtual interface, because there are no symbols that need to be linked with, so
there are no mismatching symbol names either.

Everything will work fine, until a virtual call is made, which will then fail
miserably because the vtable is not where the host (or plug-in) thought it 
would be.

If you recall the spike test I sent out in the discussing we had internally in
MySQL before, this is exactly what happens. The Forte compiler and GCC mangles
names differently, but nothing happens until the code tries to make a virtual
call into a loaded plug-in.

Best wishes,
Mats Kindahl

> 
> 
> Cheers,
> 
> Ann

-- 
Mats Kindahl
Senior Software Engineer
Database Technology Group
Sun Microsystems

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to