• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: RTTI and exceptions between plugins (solution)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RTTI and exceptions between plugins (solution)


  • Subject: Re: RTTI and exceptions between plugins (solution)
  • From: Steve Baxter <email@hidden>
  • Date: Wed, 3 May 2006 20:33:02 +0100

Hmm,

I've tried using NSModule directly to do my loading - that doesn't seem to work either!

The RTTI info that is causing the problem definitely seems to be exported from both modules:

00063f48 (__DATA,__const_coal) weak external __ZTI12CImageWindow

and

003c52e8 (__DATA,__const_coal) weak external __ZTI12CImageWindow

For some reason though the dynamic linker is not coalescing the symbols into the global namespace.

Does anyone know of any settings that will allow me to see what the dynamic linker is doing?

Cheers,

Steve.

On 3 May 2006, at 13:54, Peter O'Gorman wrote:

On Wed, 2006-05-03 at 13:36 +0100, Steve Baxter wrote:
Hi,

I've found a bit of a problem with my solution below.

On 10.4.6, this all works fine - dlopen( RTLD_GLOBAL ) loads my
plugins and correctly fixes up all the RTTI information etc. so that
the one definition rule is obeyed.

On 10.3.9 however, dlopen( RTLD_GLOBAL ) does not fix up the plugins
correctly - modules end up with different RTTI typeid() addresses for
the same types (which then causes dynamic_cast to fail).

Does anyone know what could be going on here?  I know dlopen() was
completely changed for Tiger, but surely the behaviour isn't that
broken in Panther?!

I wouldn't bet on that :/

Things to check on panther - is your plugin a bundle or dylib? If dylib,
is it linked with -single_module? Is it actually being bound by the
dynamic linker?


If your plugins are bundles - try with -single_module dylibs, if dylibs,
try bundles.


If all that fails, go back to bundles and use the NSModule api yourself
rather than dlopen(). On panther, dlopen( RTLD_GLOBAL) actually opens
with the PRIVATE option and then calls an undocumented routine to make
it global. You may have better luck opening them globally in the first
place.


Hope this helps,
Peter

Steve Baxter Software Development Manager Improvision +44-2476-692229

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: RTTI and exceptions between plugins (solution) (From: Steve Baxter <email@hidden>)
 >Re: RTTI and exceptions between plugins (solution) (From: "Peter O'Gorman" <email@hidden>)

  • Prev by Date: Re: Specify multi-variant/arch output in custom build rule
  • Next by Date: Re: Specify multi-variant/arch output in custom build rule
  • Previous by thread: Re: RTTI and exceptions between plugins (solution)
  • Next by thread: Help : Debugging 3rd party plugin via XCode 2.2.1
  • Index(es):
    • Date
    • Thread