Next | Prev | Up | Top | Contents | Index
Object Files and Dynamic Linking
Object files generated by Silicon Graphics compilers are in the Executable and Linking Format (ELF). ELF is the format specified by the System V Release 4 Applications Binary Interface (SVR4 ABI).
ELF provides support for dynamic shared objects (DSOs). A DSO is an object file that's shared by multiple applications as they are executing. The object code of a DSO is position-independent and can be mapped into the virtual address of several processes. DSOs are loaded at runtime (instead of at linking time) by the runtime loader, rld.
DSOs replace the static shared libraries provided with releases of IRIX prior to IRIX 5.0. You can, and generally should, use them in place of archive libraries. Using DSOs with your application provides you with several benefits. These include the following:
- Overall memory usage is minimized because code is shared.
- Executables linked with DSOs are smaller (and take less disk space) than those linked with unshared libraries because the shared objects are not part of the executable file image.
- Executables containing DSOs don't have to be relinked if the DSO changes.
- DSOs are easier to use and build than the static shared libraries available in releases of IRIX prior to IRIX 5.0.
Most libraries supplied by Silicon Graphics are available as DSOs. When you invoke a compiler driver to build an executable file from your source program, the driver links to DSOs unless you specify otherwise.
You can build your own DSOs if you have the IRIS Developer's Option installed on your system. You don't have to make any changes to your source code to make it part of a DSO. Just use ld with the -shared option to build the DSO.
Next | Prev | Up | Top | Contents | Index