dlopen and shared objects 'pointers'
Is it possible to successfully call dlopen()
on a shared object that 'points' to another shared object? For example, I'd like to dynamically open the library /usr/lib/libpanel.so
. However, it is not an actual library; rather, it 'points' to /usr/lib/libpanelw.so
:
开发者_JAVA技巧$ cat /usr/lib/libpanel.so
INPUT(-lpanelw)
With dlopen()
I get a file too short
error. Is there any way to successfully load these kinds of libraries?
(Bonus Question: what is the actual term for these kinds of libraries?)
You can do this through symbolic links. Chances are high that your system already does exactly that with many standard .so's.
Try ln -s /usr/lib/libpanelw.so /usr/lib/libpanel.so
精彩评论