Linker and Libraries Guide

Overview

As part of the initialization and execution of a dynamic executable, an interpreter is called to complete the binding of the application to its dependencies. In Solaris this interpreter is referred to as the runtime linker.

During the link-editing of a dynamic executable, a special .interp section, together with an associated program header, are created. This section contains a pathname specifying the program's interpreter. The default name supplied by the link-editor is that of the runtime linker -- /usr/lib/ld.so.1 for a 32-bit executable and /usr/lib/sparcv9/ld.so.1 for a 64-bit SPARCV9 executable.

During the process of executing a dynamic executable (see exec(2)) , the kernel maps the file (see mmap(2)), and using the program header information (see "Program Header") locates the name of the required interpreter. The kernel maps this interpreter and transfers control to it, passing sufficient information to allow the interpreter to continue binding the application and run it.

In addition to initializing an application, the runtime linker provides services that allow the application to extend its address space by mapping additional objects and binding to symbols within them.

The following is a simple breakdown of the runtime linker's functionality, and introduction to the topics covered in this chapter: