The /lib directory contains those shared library images needed to boot the system and run the commands in the root filesystem.
/lib modules |
essential shared libraries and kernel modules Loadable kernel modules |
Tree 3.6.1
This includes /lib/libc.so.*, /lib/libm.so.*, the shared dynamic linker /lib/ld.so, and other shared libraries required by binaries in /bin and /sbin.
Shared libraries that are only necessary for binaries in /usr (such as any X Window binaries) do not belong in /lib. Only the shared libraries required to run binaries in /bin and /sbin should be here. The library libm.so.* may also be placed in /usr/lib if it is not required by anything in /bin or /sbin.
For compatibility reasons, /lib/cpp needs to exist as a reference to the C preprocessor installed on the system. The usual placement of this binary is /usr/lib/gcc-lib/<target>/<version>/cpp. /lib/cpp can either point at this binary, or at any other reference to this binary which exists in the filesystem. (For example, /usr/bin/cpp is also often used.)
The specification for /lib/modules is forthcoming.