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


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

Naming Conventions

Recording a Shared Object Name

Inclusion of Shared Objects in Archives

Recorded Name Conflicts

Shared Objects With Dependencies

Dependency Ordering

Shared Objects as Filters

Generating Standard Filters

Generating Auxiliary Filters

Filtering Combinations

Filtee Processing

Performance Considerations

Analyzing Files With elfdump

Underlying System

Lazy Loading of Dynamic Dependencies

Position-Independent Code

SPARC: -K pic and -K PIC Options

Remove Unused Material

Maximizing Shareability

Move Read-Only Data to Text

Collapse Multiply-Defined Data

Use Automatic Variables

Allocate Buffers Dynamically

Minimizing Paging Activity


Symbol Lookup

When Relocations are Performed

Combined Relocation Sections

Copy Relocations

Using the -B symbolic Option

Profiling 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


Dependency Ordering

When dynamic executables and shared objects have dependencies on the same common shared objects, the order in which the objects are processed can become less predictable.

For example, assume a shared object developer generates with the following dependencies.

$ ldd =>     ./ =>     ./ =>     ./

If you create a dynamic executable prog, using this shared object, and define an explicit dependency on, the resulting shared object order will be as follows.

$ cc -o prog main.c -R. -L. -lC -lfoo
$ ldd prog =>     ./ =>   ./ =>     ./ =>     ./

Any requirement on the order of processing the shared object dependencies would be compromised by the construction of the dynamic executable prog.

Developers who place special emphasis on symbol interposition and .init section processing should be aware of this potential change in shared object processing order.