[lug] library naming conventions, sym links

D. Stimits stimits at comcast.net
Sun Jul 17 08:36:31 MDT 2005


...
>>>However, it seems that rpm is telling me this is wrong. Rpm seems to 
>>>want to do this, where libSomeLib.so.0.0.0 is the hard link:
>>>libSomeLib.so -> libSomeLib.so.0.0.0
>>>libSomeLib.so.0 -> libSomeLib.so.0.0.0
>>>libSomeLib.so.0.0 -> libSomeLib.so.0.0.0
> 
> There are fewer symlinks traversed with this setup. You have
> libxxx.so -> libxxx.0.0.0 vs. libxxx.so -> libxxx.s.0 ... -> libxxx.so.0.0.0
...

The traversal isn't actually expensive. Partly because the library is 
opened and read, not re-opened each call of a library method. Add to 
this that the linker probably has a good portion of this cached as to 
how to find symbols...programs will not normally use dlopen to manually 
open libraries, they tend to use the runtime environment instead (except 
in the case of "plugins").

But, all that aside, pointing everything at the .so.0.0.0 directly 
breaks versioning. This only works well if there is only 1 version. It 
seems harmful to people using any compat libraries, possibly causing 
more maintenance efforts (and more chances for versioning to break things).

D. Stimits, stimits AT comcast DOT net



More information about the LUG mailing list