Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
     Contents   Next 
   
 

Preface

In the Solaris™ operating environment, application developers can create applications and libraries 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 those who want to understand more fully the concepts involved in using the Solaris linkers.

About This Manual

This manual describes the operations of the 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 Solaris linkers, 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.

Not many programmers should need to read this manual from cover to cover.

Organization

Chapter 1, Introduction to the Solaris Linkers gives an overview of the linking processes under the Solaris operating environment, together with an introduction of new features added with this release. This chapter is intended for all programmers.

Chapter 2, Link-Editor describes the functions of the link-editor, its two modes of linking (static and dynamic), scope and forms of input, and forms of output. 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, Mapfile Option describes the mapfile directives to the link-editor, which specify the layout of the output file. 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, New Linker and Libraries Features and Updates provides an overview of new features and updates that have been added to the link-editors and indicates to which release they were added.

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


Note - In this document the term "IA" refers to the Intel 32-bit processor architecture, which includes the Pentium, Pentium Pro, Pentium II, Pentium II Xeon, Celeron, Pentium III, and Pentium III Xeon processors and compatible microprocessor chips made by AMD and Cyrix.


Accessing Sun Documentation Online

The docs.sun.comSM Web site enables you to access Sun technical documentation online. You can browse the docs.sun.com archive or search for a specific book title or subject. The URL is http://docs.sun.com.

Typographic Conventions

The following table describes the typographic changes used in this book.

Table P-1 Typographic Conventions

Typeface or Symbol

Meaning

Example

AaBbCc123

The names of commands, files, and directories; on-screen computer output 

Edit your .login file.

Use ls -a to list all files.

machine_name% you have mail.

AaBbCc123

What you type, contrasted with on-screen computer output 

machine_name% su

Password:

AaBbCc123

Command-line placeholder: replace with a real name or value 

To delete a file, type rm filename.

AaBbCc123

Book titles, new words, or terms, or words to be emphasized.

Read Chapter 6 in User's Guide.

These are called class options.

You must be root to do this.

Shell Prompts in Command Examples

The following table shows the default system prompt and superuser prompt for the C shell, Bourne shell, and Korn shell.

Table P-2 Shell Prompts

Shell

Prompt

C shell prompt machine_name%
C shell superuser prompt machine_name#
Bourne shell and Korn shell prompt $
Bourne shell and Korn shell superuser prompt #
 
 
 
     Contents   Next