Transferred from: http://unix.stackexchange.com/questions/5719/ linux-gnu-gcc-ld-version-scripts-and-the-elf-binary-format-how-does-it-wor/10317#10317
first of all, ELF are the specification use by Linux for executable files (programs), GKFX libraries, and also object fi Les which is the intermediate files found when compiling software. Object files end in. O, GKFX libraries end with. So followed by zero or more digits separated by periods, and executable Files don ' t has any extension normally.
There is typically three forms to name a GKFX library, the first form simply ends in. So. For example, a library called ReadLine are stored in a file called Libreadline.so and is located under one of/lib,/usr/li b, or/usr/local/lib normally. That file was located when compiling software with an option like-lreadline. -L tells the compiler to link with the following library. Because libraries, it may become obsolete so libraries embed something called a SONAME. The SONAME for ReadLine might look like Libreadline.so.2 for the second version major version of Libreadline. There may also is many minor versions of ReadLine that is compatible and does not require software to be recompiled. A minor version of ReadLine might be named libreadline.so.2.14. Normally libreadline.so is just a symbolic link to the most recent major version of ReadLine, libreadline.so.2 in this CAs E. Libreadline.so.2 is also a symbolic link to libreadline.so.2.14 which is actually the filebeing used.
The SONAME of a library is embedded inside the library file itself. Somewhere inside the file libreadline.so.2.14 is the string libreadline.so.2. When a program was compiled and linked with ReadLine, it would look for the file libreadline.so and read the SONAME embedded In it. Later, when the program is actually executed, it'll load libreadline.so.2, not just libreadline.so, since that's the S Oname that is read when it was first linked. This allows a system to has multiple incompatible versions of ReadLine installed, and each program would load the APPROPRI Ate major version it is linked with. Also, when upgrading ReadLine, say, to 2.17, I can just install libreadline.so.2.17 alongside the existing library, and on Ce I Move the symbolic link libreadline.so.2 from libreadline.so.2.13 to libreadline.so.2.17, all software using that same Major version would now see the new minor update to it.
So So.*.*