JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Linker and Libraries Guide     Oracle Solaris 11 Information Library
search filter icon
search icon

Document Information

Preface

Part I Using the Link-Editor and Runtime Linker

1.  Introduction to the Oracle Solaris Link Editors

2.  Link-Editor

3.  Runtime Linker

4.  Shared Objects

5.  Interfaces and Versioning

6.  Establishing Dependencies with Dynamic String Tokens

Part II Quick Reference

7.  Link-Editor Quick Reference

8.  Versioning Quick Reference

Part III Advanced Topics

9.  Direct Bindings

10.  Mapfiles

11.  Extensibility Mechanisms

Part IV ELF Application Binary Interface

12.  Object File Format

13.  Program Loading and Dynamic Linking

14.  Thread-Local Storage

Part V Appendices

A.  Linker and Libraries Updates and New Features

B.  System V Release 4 (Version 1) Mapfiles

Index

Preface

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.

For supported systems, see the Oracle Solaris OS: Hardware Compatibility Lists.


In this document, these x86 related terms mean the following:

About This Manual

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.

Intended Audience

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.

Most programmers should not need to read this manual from cover to cover.

How This Book Is Organized

Throughout this document, all command line examples use sh(1) syntax. All programming examples are written in the C language.

This manual is divided into the following parts.

Using the Oracle Solaris Link-Editor and Runtime Linker

Part 1 describes how to use the Oracle Solaris Link Editors. This information is intended for all programmers.

Chapter 1, Introduction to the Oracle Solaris Link Editors provides an overview of the linking processes under the Oracle Solaris OS.

Chapter 2, Link-Editor describes the functions of the link-editor.

Chapter 3, Runtime Linker describes the execution environment and program-controlled runtime binding of code and data.

Chapter 4, Shared Objects provides definitions of shared objects, describes their mechanisms, and explains how to create and use them.

Chapter 5, Interfaces and Versioning describes how to manage the evolution of an interface provided by a dynamic object.

Chapter 6, Establishing Dependencies with Dynamic String Tokens provides examples of how to use reserved dynamic string tokens to define dynamic dependencies.

Quick Reference

Part 2 provides quick reference information intended to provide a quick start for new users. This information is intended for all programmers.

Chapter 7, Link-Editor Quick Reference provides an overview of the most commonly used link-editor options.

Chapter 8, Versioning Quick Reference provides naming conventions and guidelines for versioning shared objects.

Advanced Topics

Part 3 covers specialized topics. This information is intended for advanced programmers.

Chapter 9, Direct Bindings describes the runtime symbol search model associated with direct bindings.

Chapter 10, Mapfiles describes the Version 2 mapfile directives to the link-editor.

Chapter 11, Extensibility Mechanisms describes interfaces for monitoring, and in some cases modifying, link-editor and runtime linker processing.

Oracle Solaris ELF Application Binary Interface

Part 4 documents the Oracle Solaris ELF Application Binary Interface (ABI). This information is intended for advanced programmers.

Chapter 12, Object File Format is a reference chapter on ELF files.

Chapter 13, Program Loading and Dynamic Linking describes how ELF files are loaded and managed at runtime.

Chapter 14, Thread-Local Storage describes Thread-Local Storage.

Appendices

Appendix A, 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.

Appendix B, System V Release 4 (Version 1) Mapfiles describes the Version 1 mapfile directives to the link-editor. This appendix is intended for programmers who need to support existing mapfiles written in this older syntax. The version 2 mapfile syntax described in Chapter 10, Mapfiles is recommended for all new applications.

Access to Oracle Support

Oracle customers have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.

Typographic Conventions

The following table describes the typographic conventions that are used in this book.

Table P-1 Typographic Conventions

Typeface
Meaning
Example
AaBbCc123
The names of commands, files, and directories, and onscreen computer output
Edit your .login file.

Use ls -a to list all files.

machine_name% you have mail.

AaBbCc123
What you type, contrasted with onscreen computer output
machine_name% su

Password:

aabbcc123
Placeholder: replace with a real name or value
The command to remove a file is rm filename.
AaBbCc123
Book titles, new terms, and terms to be emphasized
Read Chapter 6 in the User's Guide.

A cache is a copy that is stored locally.

Do not save the file.

Note: Some emphasized items appear bold online.

Shell Prompts in Command Examples

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

Shell
Prompt
Bash shell, Korn shell, and Bourne shell
$
Bash shell, Korn shell, and Bourne shell for superuser
#
C shell
machine_name%
C shell for superuser
machine_name#