gcc c89
I am just looking to link against the below shared library.
I am wondering why the programmer has created so many soft-links. The programmer has left the company and I am just wondering what is the purpose.
lrwxrwxrwx. 1 24 Jan 11 11:23 libsofia-sip-ua.so -> libsofia-sip-ua.so.0.6.0
lrwxrwxrwx. 1 24 Jan 11 11:23 libsofia-sip-ua.so.0 -> libsofia-sip-ua.so.0.6.0
-rwxrwxr-x. 1 4728304 Jan 11 11:19 libsofia-sip-ua.so.0.6.0
For what I can understand if the library was to get updated to a newer version you could just soft-link it with the updated version.
But why create libsofia-sip.so.0?
Many thanks for any suggestions,
The filename ending in
.sois the one used by the linker (not dynamic linker) when you use the-loption to specify a library you want to search/link. The linker is unaware of other suffixes and won’t find them. When the linker opens this file, it finds a different name in theDT_SONAMEfield of the library’s header, usually the name with a single-number suffix. This is the name it will store in theDT_NEEDEDfield of the new program’s dynamic linking header.The filename ending in
.so.N(e.g. N=0 in your case) is the one corresponding to theDT_SONAMEin the library file, and it represents a series of library versions which all have a compatible ABI.The filename ending in
.so.N.X.Yis the actual file for the currently installed library version. It’s possible for more than one of these to exist, and normally the other symlinks will be setup to point to the most recent version. But old versions are not automatically overwritten this way, so you could manually load an old one withLD_PRELOADor replace the symlinks if there’s a reason you need to downgrade.