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

Document Information


1.  Introduction to the Oracle Solaris Link Editors

2.  Link-Editor

3.  Runtime Linker

4.  Shared Objects

5.  Application Binary Interfaces and Versioning

6.  Support Interfaces

7.  Object File Format

8.  Thread-Local Storage

9.  Mapfiles

A.  Link-Editor Quick Reference

Static Mode

Creating a Relocatable Object

Creating a Static Executable

Dynamic Mode

Creating a Shared Object

Creating a Dynamic Executable

B.  Versioning Quick Reference

C.  Establishing Dependencies with Dynamic String Tokens

D.  Direct Bindings

E.  System V Release 4 (Version 1) Mapfiles

F.  Linker and Libraries Updates and New Features


Appendix A

Link-Editor Quick Reference

The following sections provide a simple overview, or cheat sheet, of the most commonly used link-editor scenarios. See Link-Editing for an introduction to the kinds of output modules generated by the link-editor.

The examples provided show the link-editor options as supplied to a compiler driver, this being the most common mechanism of invoking the link-editor. In these examples cc(1) is used. See Using a Compiler Driver.

The link-editor places no meaning on the name of any input file. Each file is opened and inspected to determine the type of processing it requires. See Input File Processing.

Shared objects that follow a naming convention of, and archive libraries that follow a naming convention of libx.a, can be input using the -l option. See Library Naming Conventions. This provides additional flexibility in allowing search paths to be specified using the -L option. See Directories Searched by the Link-Editor.

Over time, the link-editor has added many features that provide for the creation of high quality objects. These features can enable the object to be used efficiently and reliably in various runtime environments. However, to ensure backward compatibility with existing build environments, many of these features are not enabled by default. For example, features such as direct bindings and lazy loading must be explicitly enabled. The link-editor provides the -z guidance option to help simplify the process of selecting which features to apply. When guidance is requested, the link-editor can issue warning guidance messages. These messages suggesting options to use, and other related changes, that can help produce higher quality objects. Guidance messages might change over time, as new features are added to the link-editor, or as better practices are discovered to generate high qualify objects. See ld(1).

The link-editor basically operates in one of two modes, static or dynamic.