Skip to Content
Sun and Oracle
Channel Sun
How to Buy
Log In
Italiano
Pagina iniziale
>
Solaris 10 Software Developer Collection
> Linker and Libraries Guide
Linker and Libraries Guide
Cerca solo questo libro
Aiuto alla Ricerca
Visualizza questo libro:
Altre lingue
日本語
简体中文
Contained Within
Solaris 10 Software Developer Collection
Find More Documentation
Titolo
Prodotto
Featured Support Resources
Corsi di formazione Sun
Portale BigAdmin System Admin
Centro di assistenza Sun
Sun Solve
Scarica il manuale in formato PDF (2021 KB)
Linker and Libraries Guide
Index
Numbers and Symbols
A
B
C
D
E
F
G
I
L
M
N
O
P
R
S
T
U
V
W
Book Information
Preface
About This Manual
Intended Audience
How This Book is Organization
Documentation, Support, and Training
Sun Welcomes Your Comments
Typographic Conventions
Shell Prompts in Command Examples
1. Introduction to the Solaris OS 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
2. Link-Editor
Invoking the Link-Editor
Direct Invocation
Using a Compiler Driver
The 32–bit link-editor and 64–bit link-editor
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 Additional Symbols with a mapfile
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 Hardware and Software Capabilities
Identifying Hardware Capabilities
Identifying Software Capabilities
Software Capability Frame Pointer Processing
Relocation Processing
Displacement Relocations
Debugging Aids
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
Direct Bindings
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 Library
Debugger Module
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
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
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
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 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
7. Object File Format
File Format
Data Representation
ELF Header
ELF Identification
Data Encoding
Sections
Special Sections
COMDAT Section
Group Section
Hardware and Software 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
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
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
9. Mapfile Option
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
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
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
C. Establishing Dependencies with Dynamic String Tokens
Hardware 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
D. Linker and Libraries Updates and New Features
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
News Center
About Sun
Contact Sun
Terms of Use
Privacy
Copyright
1994-2009
Sun Microsystems, Inc.