In the Oracle Solaris operating system (Oracle Solaris OS), application developers can create applications and libraries by using the link-editor ld(1), and execute these objects with the aid of the runtime linker ld.so.1(1). This manual is for engineers who want to understand more fully the concepts involved in using the Oracle Solaris link-editor, runtime linker and related tools.
Note - This Oracle Solaris release supports systems that use the SPARC and x86 families of processor architectures. The supported systems appear in the Oracle Solaris OS: Hardware Compatibility Lists. This document cites any implementation differences between the platform types.
In this document these x86 related terms mean the following:
x86 refers to the larger family of 64-bit x86 compatible products.
x64 relates specifically to 64-bit x86 compatible CPUs.
For supported systems, see the Oracle Solaris OS: Hardware Compatibility Lists.
This manual describes the operations of the Oracle Solaris link-editor and runtime linker. Special emphasis is placed on the generation and use of dynamic executables and shared objects because of their importance in a dynamic runtime environment.
This manual is intended for a range of programmers who are interested in the Oracle Solaris link-editor, runtime linker, and related tools, from the curious beginner to the advanced user.
Beginners learn the principle operations of the link-editor and runtime linker.
Intermediate programmers learn to create, and use, efficient custom libraries.
Advanced programmers, such as language-tools developers, learn how to interpret and generate object files.
Most programmers should not need to read this manual from cover to cover.
Chapter 1, Introduction to the Oracle Solaris Link Editors provides an overview of the linking processes under the Oracle Solaris OS. This chapter is intended for all programmers.
Chapter 2, Link-Editor describes the functions of the link-editor. This chapter is intended for all programmers.
Chapter 3, Runtime Linker describes the execution environment and program-controlled runtime binding of code and data. This chapter is intended for all programmers.
Chapter 4, Shared Objects provides definitions of shared objects, describes their mechanisms, and explains how to create and use them. This chapter is intended for all programmers.
Chapter 5, Application Binary Interfaces and Versioning describes how to manage the evolution of an interface provided by a dynamic object. This chapter is intended for all programmers.
Chapter 6, Support Interfaces describes interfaces for monitoring, and in some cases modifying, link-editor and runtime linker processing. This chapter is intended for advanced programmers.
Chapter 7, Object File Format is a reference chapter on ELF files. This chapter is intended for advanced programmers.
Chapter 8, Thread-Local Storage describes Thread-Local Storage. This chapter is intended for advanced programmers.
Chapter 9, Mapfiles describes the Version 2 mapfile directives to the link-editor. This chapter is intended for advanced programmers.
Appendix A, Link-Editor Quick Reference provides an overview of the most commonly used link-editor options, and is intended for all programmers.
Appendix B, Versioning Quick Reference provides naming conventions and guidelines for versioning shared objects, and is intended for all programmers.
Appendix C, Establishing Dependencies with Dynamic String Tokens provides examples of how to use reserved dynamic string tokens to define dynamic dependencies, and is intended for all programmers.
Appendix D, Direct Bindings describes the runtime symbol search model associated with direct bindings. This appendix is intended for advanced programmers.
Appendix E, System V Release 4 (Version 1) Mapfiles describes the Version 1 mapfile directives to the link-editor. This chapter is intended for advanced programmers.
Appendix F, Linker and Libraries Updates and New Features provides an overview of new features and updates to the link-editor, runtime linker, and related tools, indicating the release in which the changes were made.
Throughout this document, all command line examples use sh(1) syntax. All programming examples are written in the C language.
See the following web sites for additional resources:
Training – Choose the country for which you want Training information for former Sun products.
Oracle Technology Network offers a range of resources related to Oracle software:
Discuss technical problems and solutions on the Discussion Forums.
Get hands-on step-by-step tutorials with Oracle By Example.
Download Sample Code.
The following table describes the typographic conventions that are used in this book.
Table P-1 Typographic Conventions
The following table shows the default UNIX system prompt and superuser prompt for shells that are included in the Oracle Solaris OS. Note that the default system prompt that is displayed in command examples varies, depending on the Oracle Solaris release.
Table P-2 Shell Prompts