• 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 Checkoway <email@hidden>
  • Date: Tue, 07 Feb 2006 19:37:25 -0800

Steve Baxter wrote:
NSLINKMODULE_OPTION_PRIVATE appears to have the same behaviour as RTLD_LOCAL (as far as I can tell, dlopen() actually calls NSLinkModule()). This will prevent symbols being resolved properly across plugins if you use CFBundle. This may be a bug in CFBundle, I'm not sure though (sometimes you might want private visibility for plugins). Possibly the bug is that CFBundle does not give you the choice.


I would say that this is a bug.

A solution to this is to call dlopen() on the bundle executable with RTLD_GLOBAL before calling CFBundleLoadExecutable(). This forces the dylib to be loaded with global visibility.

OK, hope that helps someone. It's taken me a long time to figure this out for our application! If anyone can think of any simplifications or anything I've missed, I'd be keen to hear them!

That is very good to know. The only issue that I can think of is dlopen was added in 10.3 (thank you Jorge Acereda and Peter O'Gorman!). If you're targeting any OS before that, it seems that you should call NSLinkModule() before calling CFBundleLoadExecutable() rather than dlopen().


- Steve
_______________________________________________
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: 
 >RTTI and exceptions between plugins (solution) (From: Steve Baxter <email@hidden>)

  • Prev by Date: Re: Strip -- and hack/crack security
  • Next by Date: Re: sharing precompiled headers
  • Previous by thread: RTTI and exceptions between plugins (solution)
  • Next by thread: Re: RTTI and exceptions between plugins (solution)
  • Index(es):
    • Date
    • Thread