Greetings,
I have the followiny libf.so.0.0.
If both a and b link with libf, i.e. I call
"ld -o a(or b) -lf",
then upon loading b, I get a dlopen error saying :
"conflicting usage of dlopen'ed dependents."
This appears to mean that the function f() is visible
from both places, so ld.so can't decide which f() to use.
If I link only one of a and b with libf.so.0.0, ld.so
can't find the symbol f() for the other executable.
One possibility was to link main with libf, and not have
any of a and b link with libf, but that is undesirable:
it makes main dependent upon what it loads.
Is there any way for me to solve this problem elegantly ?
In general, I have been unsuccessful in finding documentation
about the interplay between dlopen and libraries that are linked
in with a dlopen'ed object. There are issues involving the use shared
vs. archived libraries, linking the loader or the loaded executable
with the reqd. libraries, etc. Any pointers to documentation
are forthcoming.
Incidentally, AIX is much more amenable to the loading of executables
at run time, perhaps a salutary influence of OS/2. Does AIX has
kernel-level support for shared libraries ?
Thanks for reading this,
Jaideep