|Skip Navigation Links|
|Exit Print View|
|Linker and Libraries Guide Oracle Solaris 10 8/11 Information Library|
A relocatable object file holds sections containing code and data. This file is suitable to be linked with other relocatable object files to create dynamic executable files, shared object files, or another relocatable object.
A dynamic executable file holds a program that is ready to execute. The file specifies how exec(2) creates a program's process image. This file is typically bound to shared object files at runtime to create a process image.
A shared object file holds code and data that is suitable for additional linking. The link-editor can process this file with other relocatable object files and shared object files to create other object files. The runtime linker combines this file with a dynamic executable file and other shared object files to create a process image.
The first section in this chapter, File Format, focuses on the format of object files and how the format pertains to creating programs. The second section, Dynamic Linking, focuses on how the format pertains to loading programs.
Programs can manipulate object files with the functions that are provided by the ELF access library, libelf. Refer to elf(3ELF) for a description of libelf contents. Sample source code that uses libelf is provided in the SUNWosdem package under the /usr/demo/ELF directory.