O'Reilly logo

Building Embedded Linux Systems by Karim Yaghmour

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Libraries

In Chapter 4 we discussed how to build, install, and use the GNU C library and its alternatives for application development. Here, we will discuss how to install those same libraries on the target's root filesystem so that they can be used at runtime by the applications we develop. We will not discuss diet libc, because it is mainly used as a static library.

glibc

As I said earlier, the glibc package contains a number of libraries. You can see the entire list of libraries installed during the package's build process by looking at your ${TARGET_PREFIX}/lib directory. This directory contains mainly four types of files:

Actual shared libraries

These files' names are formatted as lib LIBRARY_NAME-GLIBC_VERSION .so, where LIBRARY_NAME is the name of the library and GLIBC_VERSION is the version of the glibc package you are using. The name of the math library for glibc 2.2.3 is libm-2.2.3.so.

Major revision version symbolic links

Major revision versions do not follow the same numbering as the actual glibc version. The major revision version for the actual shared C library in glibc 2.2.3, libc-2.2.3.so, is 6. In contrast, the major revision version for libdl-2.2.3.so is 2. The names of the symbolic links for the major revision version are formatted as lib LIBRARY_NAME .so. MAJOR_REVISION_VERSION, where MAJOR_REVISION_VERSION is the major revision version of the library. For the actual C library, for instance, the symbolic link is libc.so.6. For libdl, it is libdl.so.2. Once a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required