Doubt with shared libraries files

Jeffrey F. Bloss jbloss at tampabay.rr.com
Fri Mar 23 18:04:35 UTC 2007


Robe wrote:

> Hi,
> 
> Why the file "/usr/lib/libelf.so" has in its properties the type "link
> to shared library". It isn't a shared library?
> 
> What's exactly a "link to a shared library"?

Exactly what it says... a link, or "shortcut" in Windows-speak, to the
actual library file itself. ;)

The reason these links exist have a lot to do with software versions
and updates. One system may be running version 1.2.3 of a given library,
and have to because of it's age or any number of other factors. Another
system may be running version 2.3.4 of the same library, because it's
more "up to date" or has other software that depends on features the
newer version adds for instance.

It would be practically impossible for every software author on the
planet to account for the many different possible versions of a library,
because they're typically given different version-specific names like
libwhatever.so.1.2.3, libwhatever.so.2.3.4, etc. So to make it easy for
everyone, what's generally done is when the library installs it creates
this "generic" link to its own version that anyone and everyone can use
without actually knowing or having to access the version-specific
library itself. On the "newer" system calling libwhatever.so gets you
version 2.3.4 and on the "older" system it gets you version 1.2.3
automatically, without any mucking around trying to figure out which
version is installed and/or available.

-- 
     _?_      Outside of a dog, a book is a man's best friend.
    (o o)         Inside of a dog, it's too dark to read.
-oOO-(_)--OOo------------------------------[ Groucho Marx ]---
                    http://wrench.homelinux.net/~jeff/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 892 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20070323/4f7bed53/attachment.pgp>


More information about the ubuntu-users mailing list