Linker and Libraries Guide

Overview

This manual describes the operations of the Solaris link-editor and runtime linker, together with the objects on which they operate. The basic operation of the Solaris linkers involves the combination of objects and the connection of symbolic references from one object to the symbolic definitions within another. This operation is often referred to as binding.

This manual expands the following areas:

Link-Editor

The link-editor, ld(1), concatenates one or more input files (either relocatable objects, shared objects, or archive libraries) to produce one output file (either a relocatable object, an executable application, or a shared object). The link-editor is most commonly invoked as part of the compilation environment (see cc(1)).

Runtime Linker

The runtime linker, ld.so.1(1), processes dynamic executables and shared objects at runtime, and binds them to create a runable process.


Note -

ld.so.1 is a special case of a shared object and therefore allows itself to be versioned. Here a version number of 1 is used, however later releases of Solaris might provide higher version numbers.


Shared Objects

Shared objects (sometimes referred to as Shared Libraries) are one form of output from the link-edit phase. However, their importance in creating a powerful, flexible runtime environment warrants a section of its own.

Object Files

The Solaris linkers work with files that conform to the executable and linking format (ELF).

These areas, although separable into individual topics, have a great deal of overlap. While explaining each area, this document brings together the connecting principles and designs.