Symbol Sharing between Dylibs (and how to prevent it)
Symbol Sharing between Dylibs (and how to prevent it)
- Subject: Symbol Sharing between Dylibs (and how to prevent it)
- From: "Jonathan Johnson" <email@hidden>
- Date: Wed, 30 Aug 2006 16:14:42 -0500
I've spent the day debugging an issue that I feel someone else must
have come across in the past, but can't find anything through my
searches. Our product has a plugin API and is written in itself. To
support the plugin API in our IDE, we have a bridge which intercepts
calls that look up entrypoints.
The way our plugin API works is that the main entrypoint gets a
"resolver" function pointer which the plugin will then use to
dynamically request entrypoints as it needs them. This is stored in a
global variable in a common file called PluginMain.
Which leads to the conundrum. The plugin bridge that our IDE uses is
also a plugin itself, and the resolver that it needs to use is the one
that belongs to our class library. The plugins that are to be used
inside of the IDE by developers need to have the "fake" resolver that
the Plugin Bridge uses. However, in my debugging and futile efforts at
stopping this behavior, all of the loaded plugins use the same
instance of the "gResolver" variable.
I have tried a variety of things: all plugins are required to use the
two-level namespace, and I've triple checked this. I've tried a few
pre-link options that I discovered on Google. But in the end, it still
happens.
This code works great in our Carbon PEF builds, Windows builds, and
Linux builds.
Any suggestions would be greatly appreciated.
Thanks,
Jon
--
Jonathan Johnson
REAL Software, Inc.
_______________________________________________
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