Re: FCP FxPlug load order - how do I control?
site_archiver@lists.apple.com Delivered-To: pro-apps-dev@lists.apple.com Hi Pierre, [[MyFunClass alloc] init]; - Paul On Jun 26, 2008, at 1:27 PM, Pierre Jasmin wrote: Side Note: Pierre _______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (Pro-apps-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/pro-apps-dev/pschneider%40apple.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (Pro-apps-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/pro-apps-dev/site_archiver%40lists.ap... I keep hearing it's an Objective C issue with dynamic libraries. That does not sound right to me. The Objective-C runtime maintains a flat registry of all the classes defined in a process. It currently makes no distinction as to which library implements the classes. Classes are added to the registry the first time they are used. So for example, if your plugin calls: "MyFunClass" is now loaded into the global application namespace. Any code anywhere in the application can now use MyFunClass. If another library has already defined a "MyFunClass" class, then your plugin will end up using that class instead. C and C++ symbols can be restricted to individual libraries with the appropriate compiler switches, as Pete so helpfully pointed out. Obj- C classes are different; since they are not resolved at link time, but at run time, the compiler can't help you. The language's runtime would have to be modified to support per-library namespaces. Otherwise isn't there a risk (aside secutiry) if symbols get loaded in global space, that I name a function the same as you and inadvertently override it in the exec. Yes, this is a concern. Many Objective-C mavens would consider this a feature; you are free to extend or modify all classes, even those you didn't write. It's an intriguing feature in a modular application; it can cause trouble in an app that can load an arbitrary number of third- party plugins that come from various vendors and source bases. I keep hearing it's an Objective C issue with dynamic libraries. That does not sound right to me. Since I know nothing about ObjectiveC (could not even develop a stand-alone to test what I am saying), can I ask if it isn't the issue itself in Apple implementation of dlopen (or whatever you use to load) - OR simply the arguments passed to dlopen? Don't you just dlsym() the entry points of the API (RTLD_LOCAL or something)? Otherwise isn't there a risk (aside secutiry) if symbols get loaded in global space, that I name a function the same as you and inadvertently override it in the exec. This email sent to pschneider@apple.com This email sent to site_archiver@lists.apple.com
participants (1)
-
Paul Schneider