Q:

Linking to Shared Libraries Linux

Are shared libraries shared because they are loaded from the same file on disk, or are they shared because they are loaded into memory once and everyone shares that same area of memory?  In Linux are they loaded once and mapped virtually into every process space? How does this work?
EDIT: When I say shared I think I mean dynamically linked, but if there is a difference please let me know.

A:

Generally the latter (although $LD_PRELOAD changes this; see the ld.so(8) man page, ENVIRONMENT section for details). The CPU TLBs are used to map the libraries' pages into the applications' process space.

