shared library names analysis

来源:互联网 发布:js实现黑洞特效 编辑:程序博客网 时间:2024/05/06 03:58
 

There's three name reference to shared library,as following

soname: the soname has the prefix "lib",the name of the library,the phrase ".so", followed by a period and a version number that  is  incremented whenever the interface changes. A fully-qualified soname  includes as a prefix the directory it's in, on working system a fully-qualified soname is simply a symbolic link to the shared library's "real name".


real name: the real name,which is the filename containing the actual library code.The real name adds to the soname a period,a minor number,another period,and the release number.The last period and release number are optional.


linker name:this name is used by the compiler when it requesting a library,which simply the soname without any version number. the linker name is setup during library installation,and it is simply created as a symbolic link to the "latest" soname or the latest real name.


Example:
fully-qualified soname:/usr/lib/libreadline.so.3, ldconfig would set to be a symbolic to some real ame like:
/usr/lib/libreadline.so.3.0.
linker name:/usr/lib/libreadline.so which could be a symbolic referring to /usr/lib/libreadline.so.3.

原创粉丝点击