dlopen/shared library interplay: SunOS

dlopen/shared library interplay: SunOS

Post by Jaideep Mirchanda » Wed, 19 Jan 1994 06:32:52


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,


1. Shared variable between main() and loaded shared library - dlopen()

I created an executable that loads a shared library via dlopen().
The main program and the shared library use an identical object file
at link time. I expect the address of a particular variable to be
different at runtime, but I notice that the variable is actually identical
by address.
What needs to be done in order for the variable to have
2 separate addresses. Is it a link issue ? Is it an different option
in dlopen() ? I am using the standard C++ compiler (xlC_r) and
This behavior appears also under HP-UX, Linux and Solaris.
Thanks for your help.

2. ipsec and gif tunnels between the same two networks?

3. SunOS : dlopen'able objects and libraries

4. Compiling a new file.

5. Bugs in shared libraries (dlopen / dlclose)..

6. AIX VGDA 3.2

7. Shared Library Problem::: dlopen()

8. Tar and archive paths

9. Problem with dlopen and custom shared library.

10. Problem loading a shared library with dlopen

11. Shared libraries and dlopen/dlsym..

12. dlopen with C++ shared library

13. egcs and dlopen with C++ shared libraries