Link-editing takes a variety of input files, typically generated from compilers, assemblers, or ld(1). The link-editor concatenates and interprets the data within these input files to form a single output file. Although the link-editor provides numerous options, the output file that it produces is one of four basic types:
Relocatable object – A concatenation of input relocatable objects that can be used in subsequent link-edit phases.
Static executable – A concatenation of input relocatable objects that has all symbolic references bound to the executable, and thus represents a ready-to-run process.
Dynamic executable – A concatenation of input relocatable objects that requires intervention by the runtime linker to produce a runnable process. A dynamic executable might still need symbolic references bound at runtime, and can have one or more dependencies in the form of shared objects.
Shared object – A concatenation of input relocatable objects that provides services that might be bound to a dynamic executable at runtime. The shared object can have dependencies on other shared objects.
These output files, and the key link-editor options used to create them, are shown in Figure 1–1.
Dynamic executables and shared objects are often referred to jointly as dynamic objects. Dynamic objects are the main focus of this document.