Hi Andreas, * Andreas Jellinghaus wrote on Thu, Sep 08, 2005 at 01:44:24PM CEST: > > I moved several projects from our own generic ld() stuf > to libtool, but one project has a problem: pkcs11-spy. > this project is a shared object / plugin, that itself > also loads a shared object / plugin. the idea is that > it sits between the application (e.g. mozilla) and the > real plugin (e.g. opensc-pkcs11.so) and protocols each > call and return. extremely helpful for debugging.
Indeed, this sounds very useful. > but now it seems this doesn't work well with ltdl(). > could it be that our spy could finds its own functions > and symbold instead of those in the plugin it loads? > both is pkcs#11 api - i.e. both the pkcs11-spy.so > and the plugin it loads have the same symbols in them. Hmm. Are you trying to load both pkcs11-spy.so with lt_dlopen and also from within that the other plugins with lt_dlopen? If so: you are using CVS HEAD Libtool, right? (1.5.x versions do not really support dlopening from within libraries). > can I somehow tell lt_* functions to give me the code > in the module I'm loading, and _not_ from symbols > within itself? Or if my idea what might be wrong isn't > right, any idea else where the problem could be > or how I can debug it? Well, to put it in a pessimistic way: since we don't have a test for this kind of setup (where the same symbols are loaded), I suppose that it probably does not work. To put it in an optimistic way: your application would be a wonderful test case to debug libltdl in this respect, and make this work. :) > I'm using plain lt_dlinit, lt_dlopen, lt_dlsym, lt_dlclose. > using the with dl() functions instead it works fine. > but since the software needs to work on win32 (native), > mac os X, solaris and linux at least I'd be happier with > using ltdl, if possible. Well, there are several issues to think about: First, I would not even know without searching some docs whether this can be made to work on all kinds of systems; static-only wouldn't, but you knew that :) But also on AIX, or OS X or win32, for that matter, I would assume that we may need adaptations. Is your code open, can we inspect it? Even better, do you have small test cases to show what needs to be achieved? Cheers, Ralf _______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool
