Documentation Home
> Linker and Libraries Guide
Linker and Libraries Guide
Book Information
Index
Numbers and Symbols
A
B
C
D
E
F
G
I
L
M
N
O
P
R
S
T
U
V
W
Preface
Chapter??1 Introduction to the Oracle Solaris Link Editors
Link-Editing
Static Executables
Runtime Linking
Related Topics
Dynamic Linking
Application Binary Interfaces
32???Bit Environments and 64???Bit Environments
Environment Variables
Support Tools
Chapter??2 Link-Editor
Invoking the Link-Editor
Direct Invocation
Using a Compiler Driver
Cross Link-Editing
Specifying the Link-Editor Options
Input File Processing
Archive Processing
Shared Object Processing
Linking With Additional Libraries
Library Naming Conventions
Linking With a Mix of Shared Objects and Archives
Position of an Archive on the Command Line
Directories Searched by the Link-Editor
Using a Command-Line Option
Using an Environment Variable
Directories Searched by the Runtime Linker
Initialization and Termination Sections
Symbol Processing
Symbol Resolution
Simple Resolutions
Complex Resolutions
Fatal Resolutions
Undefined Symbols
Generating an Executable Output File
Generating a Shared Object Output File
Weak Symbols
Tentative Symbol Order Within the Output File
Defining Additional Symbols
Defining Additional Symbols with the -u option
Defining Symbol References
Defining Absolute Symbols
Defining Tentative Symbols
Augmenting a Symbol Definition
Reducing Symbol Scope
Symbol Elimination
External Bindings
String Table Compression
Generating the Output File
Identifying Capability Requirements
Identifying a Platform Capability
Identifying a Machine Capability
Identifying Hardware Capabilities
Identifying Software Capabilities
Software Capability Frame Pointer Processing
Software Capability Address Space Restriction Processing
Creating a Family of Symbol Capabilities Functions
Creating a Family of Symbol Capabilities Data Items
Converting Object Capabilities to Symbol Capabilities
Exercising a Capability Family
Relocation Processing
Displacement Relocations
Debugging Aids
Chapter??3 Runtime Linker
Shared Object Dependencies
Locating Shared Object Dependencies
Directories Searched by the Runtime Linker
Configuring the Default Search Paths
Dynamic String Tokens
Relocation Processing
Relocation Symbol Lookup
Default Symbol Lookup
Runtime Interposition
When Relocations Are Performed
Relocation Errors
Loading Additional Objects
Lazy Loading of Dynamic Dependencies
Providing an Alternative to dlopen()
Initialization and Termination Routines
Initialization and Termination Order
Security
Runtime Linking Programming Interface
Loading Additional Objects
Relocation Processing
Symbol Lookup
Default Symbol Lookup Model
Defining a Global Object
Isolating a Group
Object Hierarchies
Obtaining New Symbols
Testing for Functionality
Using Interposition
Debugging Aids
Debugging Facility
Debugger Module
Chapter??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
Relocations
Symbol Lookup
When Relocations are Performed
Combined Relocation Sections
Copy Relocations
Using the -B symbolic Option
Profiling Shared Objects
Chapter??5 Application Binary Interfaces and Versioning
Interface Compatibility
Internal Versioning
Creating a Version Definition
Creating a Weak Version Definition
Defining Unrelated Interfaces
Binding to a Version Definition
Verifying Versions in Additional Objects
Specifying a Version Binding
Binding to Additional Version Definitions
Redefining an Interface
Binding to a Weak Version
Version Stability
Relocatable Objects
External Versioning
Coordination of Versioned Filenames
Multiple External Versioned Files in the Same Process
Chapter??6 Support Interfaces
Link-Editor Support Interface
Invoking the Support Interface
32???Bit Environments and 64???Bit Environments
Support Interface Functions
Support Interface Example
Runtime Linker Auditing Interface
Establishing a Namespace
Creating an Audit Library
Invoking the Auditing Interface
Recording Local Auditors
Recording Global Auditors
Audit Interface Interactions
Audit Interface Functions
Audit Interface Example
Audit Interface Demonstrations
Audit Interface Limitations
Exercising Application Code
Use of la_pltexit()
Functions That Directly Inspect the Stack
Runtime Linker Debugger Interface
Interaction Between Controlling and Target Process
Debugger Interface Agents
Debugger Exported Interface
Agent Manipulation Interfaces
Error Handling
Scanning Loadable Objects
Event Notification
Procedure Linkage Table Skipping
Dynamic Object Padding
Debugger Import Interface
Chapter??7 Object File Format
File Format
Data Representation
ELF Header
ELF Identification
Data Encoding
Sections
Section Merging
Special Sections
COMDAT Section
Group Section
Capabilities Section
Hash Table Section
Move Section
Note Section
Relocation Sections
Relocation Types (Processor-Specific)
SPARC: Relocation Types
64-bit SPARC: Relocation Types
32-bit x86: Relocation Types
x64: Relocation Types
String Table Section
Symbol Table Section
Symbol Values
Symbol Table Layout and Conventions
Symbol Sort Sections
Register Symbols
Syminfo Table Section
Versioning Sections
Version Definition Section
Version Dependency Section
Version Symbol Section
Dynamic Linking
Program Header
Base Address
Segment Permissions
Segment Contents
Program Loading (Processor-Specific)
Program Interpreter
Runtime Linker
Dynamic Section
Global Offset Table (Processor-Specific)
Procedure Linkage Table (Processor-Specific)
32-bit SPARC: Procedure Linkage Table
64-bit SPARC: Procedure Linkage Table
32-bit x86: Procedure Linkage Table
x64: Procedure Linkage Table
Chapter??8 Thread-Local Storage
C/C++ Programming Interface
Thread-Local Storage Section
Runtime Allocation of Thread-Local Storage
Program Startup
Thread Creation
Post-Startup Dynamic Loading
Deferred Allocation of Thread-Local Storage Blocks
Thread-Local Storage Access Models
SPARC: Thread-Local Variable Access
SPARC: General Dynamic (GD)
SPARC: Local Dynamic (LD)
32-bit SPARC: Initial Executable (IE)
64-bit SPARC: Initial Executable (IE)
SPARC: Local Executable (LE)
SPARC: Thread-Local Storage Relocation Types
32-bit x86: Thread-Local Variable Access
32-bit x86: General Dynamic (GD)
x86: Local Dynamic (LD)
32-bit x86: Initial Executable (IE)
32-bit x86: Local Executable (LE)
32-bit x86: Thread-Local Storage Relocation Types
x64: Thread-Local Variable Access
x64: General Dynamic (GD)
x64: Local Dynamic (LD)
x64: Initial Executable (IE)
x64: Local Executable (LE)
x64: Thread-Local Storage Relocation Types
Chapter??9 Mapfiles
Mapfile Structure and Syntax
Mapfile Version
Conditional Input
Directive Syntax
Mapfile Directives
CAPABILITY Directive
HW Attribute
HW_1 / HW_2 Attributes
MACHINE Attribute
PLATFORM Attribute
SF Attribute
SF_1 Attribute
DEPEND_VERSIONS Directive
ALLOW Attribute
REQUIRE Attribute
HDR_NOALLOC Directive
PHDR_ADD_NULL Directive
LOAD_SEGMENT / NOTE_SEGMENT / NULL_SEGMENT Directives
ALIGN Attribute (LOAD_SEGMENT only)
ASSIGN_SECTION Attribute
DISABLE Attribute
FLAGS Attribute (LOAD_SEGMENT only)
IS_ORDER Attribute
MAX_SIZE Attribute (LOAD_SEGMENT only)
NOHDR Attribute (LOAD_SEGMENT only)
OS_ORDER Attribute
PADDR Attribute (LOAD_SEGMENT only)
ROUND Attribute (LOAD_SEGMENT only)
SIZE_SYMBOL Attribute (LOAD_SEGMENT only)
VADDR (LOAD_SEGMENT only)
SEGMENT_ORDER Directive
STACK Directive
SYMBOL_SCOPE / SYMBOL_VERSION Directives
AUXILIARY Attribute
FILTER Attribute
FLAGS Attribute
SIZE Attribute
TYPE Attribute
VALUE Attribute
Predefined Segments
Mapping Examples
Example: Section to Segment Assignment
Example: Predefined Section Modification
Link-Editor Internals: Section and Segment Processing
Section To Segment Assignment
Mapfile Directives for Predefined Segments and Entrance Criteria
Appendix??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
Appendix??B Versioning Quick Reference
Naming Conventions
Defining a Shared Object's Interface
Versioning a Shared Object
Versioning an Existing (Non-versioned) Shared Object
Updating a Versioned Shared Object
Adding New Symbols
Internal Implementation Changes
New Symbols and Internal Implementation Changes
Migrating Symbols to a Standard Interface
Appendix??C Establishing Dependencies with Dynamic String Tokens
Capability Specific Shared Objects
Reducing Filtee Searches
Instruction Set Specific Shared Objects
Reducing Filtee Searches
System Specific Shared Objects
Locating Associated Dependencies
Dependencies Between Unbundled Products
Security
Appendix??D Direct Bindings
Observing Symbol Bindings
Enabling Direct Binding
Using the -B direct Option
Using the -z direct Option
Using the DIRECT mapfile Keyword
Direct Bindings and Interposition
Localizing Symbol Instances
Removing Multiply Defined Symbols of the Same Name
Defining Explicit Interposition
Preventing a Symbol from being Directly Bound to
Using the -B nodirect Option
Using the NODIRECT mapfile Keyword
Appendix??E System V Release 4 (Version 1) Mapfiles
Mapfile Structure and Syntax
Segment Declarations
Mapping Directives
Section-Within-Segment Ordering
Size-Symbol Declarations
File Control Directives
Mapping Example
Mapfile Option Defaults
Internal Map Structure
Appendix??F Linker and Libraries Updates and New Features
Oracle Solaris 11 Express
Obsolete Feature
Solaris 10 Update 10 Release
Solaris 10 5/08 Release
Solaris 10 8/07 Release
Solaris 10 1/06 Release
Solaris 10 Release
Solaris 9 9/04 Release
Solaris 9 4/04 Release
Solaris 9 12/03 Release
Solaris 9 8/03 Release
Solaris 9 12/02 Release
Solaris 9 Release
Solaris 8 07/01 Release
Solaris 8 01/01 Release
Solaris 8 10/00 Release
Solaris 8 Release
© 2010, Oracle Corporation and/or its affiliates