Loading AI tools
Field of data in a shared object file From Wikipedia, the free encyclopedia
In Unix and Unix-like operating systems, a soname is a field of data in a shared object file.[1] The soname is a string, which is used as a "logical name" (i.e., identifier) describing the functionality of the object. Typically, that name is equal to the filename of the library, or to a prefix thereof, e.g. libc.so.6
.
This article needs additional citations for verification. (July 2014) |
The soname is often used to provide version backwards-compatibility information.[2] For instance, if versions 1.0 through 1.9 of the shared library "libx" provide identical interfaces, 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.[3]
If the application binary interface of a library changes in a backward-incompatible way, the soname would be "bumped" or incremented, e.g. from "libx.so.1" to "libx.so.2".
The GNU linker uses the -hname
or -soname=name
command-line options to specify the library name field. Internally, the linker will create a DT_SONAME field and populate it with name.
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
SONAME libx.so.1
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.