||This article includes a list of references, related reading or external links, but its sources remain unclear because it lacks inline citations. (July 2014) (Learn how and when to remove this template message)|
In Unix and Unix-like operating systems, a soname is a field of data in a shared object file. The soname is a string, which is used as a "logical name" describing the functionality of the object (typically, that name is equal to the filename of the library, or to a prefix thereof, e.g.
The soname is often used to provide version backwards-compatibility information. For instance, if versions 1.0 through 1.9 of the shared library
libx provide identical interface, they would all have the same soname, e.g.
libx.so.1. If the system only includes version 1.3 of that shared object, with filename
libx.so.1.3, the soname field of the shared object tells the system that it can be used to fill the dependency for a binary which was originally compiled using version 1.2. Note that libc.so is a particular case with and a complex history, see GNU C Library)
The GNU linker uses the
-soname=name to specify the library name field. Internally, the linker will create a
DT_SONAME field and populate it with
Given any shared object file, one can use the following command to get the information from within the library file using objdump:
objdump -p libx.so.1.3 | grep SONAME
- linuxquestions.org wiki
- System V ABI (4.1)
- Libtool's versioning scheme
- IBM developerWorks article "Shared objects for the object disoriented!" covering shared libraries including naming conventions.
|This Unix-related article is a stub. You can help Wikipedia by expanding it.|