Hi,
After I using the dlopen some libs successfully, I tried to use dlsym to find
the symbol.
E.g.
The open order is (liba => libb => libc):
liba = dlopen("./liba.so", RTLD_LAZY); //liba.so has the aSymbol
libb = dlopen("./libb.so", RTLD_LAZY); //libb.so has the bSymbol
libc = dlopen("./libc.so", RTLD_LAZY); //libc.so has the cSymbol
Use dlsym to find the symbol:
bSymbol = dlsym(liba, "bSymbol")); //we can find the bSymbol and
cSymbol via liba
cSymbol = dlsym(liba, "cSymbol"));
aSymbol = dlsym(libb, "aSymbol")); //but, we can not find the
aSymbol via libb or libc
aSymbol = dlsym(libc, "aSymbol"));
cSymbol = dlsym(libb, "cSymbol")); //we can find the cSymbol via
libb
bSymbol = dlsym(libc, "bSymbol")); //but, we can not find the
bSymbol via libc
It looks like that we can find all the following symbols via the first opened
handle
and find all the following symbols except first opened symbols via the second
opened handle, and so on.
Is it a bug or it supposed to act like that ?
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc