Cristian Rodríguez
Hi:
Suppose I have 3 modules to be dlopen'ed by executable MYPROG.
foo.so, bar.so, epicfail.so
epicfail.so needs symbols from bar.so and bar.so needs symbols from foo.so. Usually iif such symbols cannot be resolved because bar or foo has not been loaded or has fail, programs will either abort or print an unfriendly message that bar_mysymbol is not defined or similar.
Is there any way to programatically tell the dynamic linker:
"load foo, then bar, then epicfail and shutdown in a way that makes sense if that is not possible, let my app to print a message and return EXIT_FAILURE cleanly"
I am aware that I can tell the application to load modules in an specific order providing modules some magic dependency information, reading it at load time and then proceeding ... however my search for a clean OS/linker level solution has not been successful.
is there any way to do this in a sane manner or I am missing something ?
From the man page:
void *dlopen(const char *file, int mode); RTLD_LAZY Relocations shall be performed at an implementation-defined time, ranging from the time of the dlopen() call until the first reference to a given symbol occurs. Specifying RTLD_LAZY should improve performance on implementations supporting dynamic symbol binding as a process may not refer- ence all of the functions in any given object. And, for systems supporting dynamic symbol resolution for normal process execution, this behavior mimics the normal handling of process execution. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org