Solaris SPARC to Solaris x86 Porting Guide
Object files
The Solaris OS link editors work with files that conform to the executable and linking format,
otherwise referred to as ELF.
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 is produced 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 have all symbolic references
resolved. This executable 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. Dynamic executables typically have one or more dependencies in the
form of shared objects.
• Shared object—A concatenation of input relocatable objects that provide 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 in their creation, are shown in the following
figure.
Dynamic executables and shared objects are often referred to jointly as dynamic objects.
32–bit Environments and 64–bit environments
The link-editors are provided as 32–bit applications and 64–bit applications. Each link-editor can
operate on 32–bit objects and 64–bit objects. However, a link-edit cannot contain a mix of 32–bit
objects and 64–bit objects. On systems that are running a 64–bit environment, both versions of the
link-editor can be executed. On systems that are running a 32–bit environment, only the 32–bit
version of the link-editor can be executed. Although a 32–bit link-editor can generate a 64–bit object,
the size of the generated object, not including the .bss, is restricted to 2 Gbytes.
18