Title and Copyright Information
About this Manual
Related Documents
Reader's Comments
1    Introduction
1.1    Definitions
1.2    History and Applicability
1.3    Producers and Consumers
1.3.1    Compilers
1.3.2    Assemblers
1.3.3    Linkers
1.3.4    Loaders
1.3.5    Debuggers
1.3.6    Object Instrumentation Tools    Post-Link Optimizers    Profiling Tools
1.3.7    Archivers
1.3.8    Miscellaneous Object Tools    Object Dumpers    Object Manipulators
1.4    Object File Overview
1.4.1    Main Components of Object Files    Object File Headers    Instructions and Data    Object File Relocation Information    Symbol Table    Dynamic Loading Information    Comment Section
1.4.2    Kinds of Object Files
1.4.3    Object File Compression
1.4.4    Object Archives
1.4.5    Object File Versioning
1.4.6    Object File Abstract Data Types
1.5    Source Language Support
1.6    System Dependencies
1.7    Architectural Dependencies
1.8    Relevant Header Files
2    Headers
2.1    New or Changed Header Features
2.2    Structures, Fields, and Values for Headers
2.2.1    File Header (filehdr.h)
2.2.2    a.out Header (aouthdr.h)
2.2.3    Section Headers (scnhdr.h)
2.3    Header Usage
2.3.1    Object Recognition
2.3.2    Image Layout    OMAGIC    NMAGIC    ZMAGIC
2.3.3    Address Space    Address Selection    TASO Address Space    Runtime Identification of TASO programs
2.3.4    GP (Global Pointer) Ranges
2.3.5    Alignment
2.3.6    Section Types
2.3.7    Special Symbols    Accessing
2.4    Language-Specific Header Features
3    Instructions and Data
3.1    New or Changed Instructions and Data Features
3.2    Structures, Fields, and Values for Instructions and Data
3.2.1    Code Range Descriptor (pdsc.h)
3.2.2    Run-time Procedure Descriptor (pdsc.h)
3.3    Instructions and Data Usage
3.3.1    Minimal Objects
3.3.2    Position-Independent Code (PIC)
3.3.3    Lazy-Text Stubs
3.3.4    Constant Data
3.3.5    INIT/FINI Driver Routines    Linking    Execution Order    Dynamic Executables    Static Executables    Ordering Within Objects    Subsystem Control of INIT/FINI Order
3.3.6    Initialized Data and Zero-Initialized Data (bss)
3.3.7    Permissions/Protections
3.3.8    Exception Handling Data
3.3.9    Thread Local Storage (TLS) Data
3.3.10    User Text and User Data Sections
3.4    Language-Specific Instructions and Data Features
4    Object Relocation
4.1    New or Changed Object Relocation Features
4.2    Structures, Fields, and Values for Object Relocation
4.2.1    Relocation Entry (reloc.h)
4.2.2    Section Header
4.3    Object Relocations Usage
4.3.1    Relocatable Objects
4.3.2    Relocation Processing    Local and External Entries    Relocation Entry Ordering    Shared Object Transformation
4.3.3    Kinds of Relocations    Direct Relocations    GP-Relative Relocations    Self-Relative (PC-Relative) Relocations    Literal Relocations    Relocation Stack Expressions    Immediate Relocations    TLS Relocations
4.4    Language-Specific Relocations Features
5    Image Relocation
5.1    New or Changed Image Relocations Features
5.2    Structures, Fields, and Values for Image Relocation
5.2.1    Compact Relocation Records
5.2.2    Linkerdef Relocation Records (scncomment.h)    Linkerdef Symbol Enumeration
5.3    Image Relocation Usage
5.3.1    Compact Relocations    Overview    File Format    Compact Relocation Version    Compact Relocations File Header    Compact Relocations Section Header    Compact Relocations Table    Stack Relocation Table    GP Value Tables    Basic Algorithm for Compact Relocations Production    Basic Algorithm for Compact Relocations Consumption
5.3.2    Linkerdef Relocations
5.4    Language-Specific Image Relocations Features
6    Symbol Table
6.1    New or Changed Symbol Table Features
6.2    Structures, Fields and Values for Symbol Tables
6.2.1    Symbolic Header (HDRR)
6.2.2    Relative File Descriptor Entry (RFDT)
6.2.3    Optimization Symbol Entry (PPODHDR)
6.3    Symbol Table Usage
6.3.1    Levels of Symbolic Information    Compilation Levels    Locally Stripped Images    (Fully) Stripped Images
6.3.2    Source File Merging
6.3.3    Optimization Symbols
7    Line Number Information
7.1    New or Changed Line Number Features
7.2    Structures, Fields, and Values for Line Numbers
7.2.1    Line Number Entry (LINER)
7.3    Line Number Usage
7.3.1    Line Number Information    The Line Number Table    Extended Source Location Information (ESLI)
8    Run-Time Information
8.1    New or Changed Run-Time Information Features
8.2    Structures, Fields, and Values for Run-Time Information
8.2.1    File Descriptor Entry (FDR)
8.2.2    Procedure Descriptor Entry (PDR)
8.3    Run-Time Information Usage
8.3.1    Procedure Addresses
8.3.2    Stack Frames
8.3.3    Local Symbol Addresses
8.3.4    Uplevel Links
8.3.5    Finding Thread Local Storage (TLS) Symbols
9    Profile Feedback Data
9.1    New or Changed Profile Feedback Data Features
9.2    Structures, Fields, and Values for Profile Feedback Data
9.3    Profile Feedback Data Usage
10    Object Annotation Data
10.1    New or Changed Object Annotation Data Features
10.2    Structures, Fields, and Values for Object Annotation Data
10.2.1    Annotation Summary Header
10.2.2    Annotation Restricted Offset Flags
10.2.3    Annotation Restricted Instruction Flags
10.2.4    Annotation Restricted Sequence Flags
10.2.5    Annotation Restricted Call Flags
10.2.6    Annotation Restricted Entry Flags
10.2.7    Annotation Restricted Return Flags
10.2.8    Annotation Linkage Flags
10.3    Object Annotation Data Usage
10.3.1    Representation of Object Annotation Data    Object Annotation Summary    Restricted Offset Annotation    Restricted Instruction Annotation    Restricted Instruction Sequence Annotation    Restricted Call Annotation    Restricted Entry Annotation    Restricted Return Annotation    Jump Table Annotation    Call Specified Linkage Annotation    Entry Specified Linkage Annotation    Entry Utilized Linkage Annotation    Entry Implemented Linkage Annotation    Return Specified Linkage Annotation
11    Symbol Information
11.1    New or Changed Symbol Information Features
11.2    Structures, Fields, and Values for Symbol Information
11.2.1    Local Symbol Entry (SYMR)
11.2.2    Auxiliary Symbol Table Entry (AUXU)    Type Information Record (TIR)    Relative Index Record (RNDXR)
11.2.3    String Table
11.2.4    Symbol Type Combinations
11.3    Symbol Information Usage
11.3.1    Scopes    Local Symbols with External Linkage    Procedure Scope    File Scope    Block Scope    Namespaces (C++)    Namespace Components    Namespace Aliases    Unnamed Namespace    Usage of Namespaces    Fortran Modules    Modules with Use Statements    Fortran Generic Interfaces    Exception Handling Blocks (C++)    Fortran Common Blocks    Alternate Entry Points
11.3.2    Data Types in the Symbol Table    Basic Types    Type Qualifiers    Interpreting Type Descriptions in the Auxiliary Table
11.3.3    Individual Type Representations    Pointer Type    Array Type    Structure, Union, and Enumerated Types    Typedef Type    Function Pointer Type    Class Type (C++)    Empty Class or Structure (C++)    Opaque Class or Structure (C++)    Base and Derived Classes (C++)    Template Type (C++)    Interlude Type (C++)    Array Descriptor Type (Fortran90)    Conformant Array Type (Pascal)    Variant Record Type (Pascal and Ada)    Subrange Type (Pascal and Ada)    Set Type (Pascal)
11.3.4    Special Debug Symbols
11.4    Language-Specific Symbol Information Features
11.4.1    Fortran77 and Fortran90
11.4.2    C++
11.4.3    Pascal and Ada
12    Optimized Debugging
12.1    New or Changed Optimized Debugging Features
12.2    Structures, Fields, and Values for Optimized Debugging
12.2.1    OPTRNDX
12.3    Optimized Debugging Usage
12.3.1    Semantic Events
12.3.2    Split Lifetime Variables    Target Variable Identifier    Child Description Scheme    Child Descriptions    Split Lifetime Variable Example
12.3.3    Discontiguous Scopes
13    Symbol Resolution
13.1    New or Changed Symbol Resolution Features
13.2    Structures, Fields, and Values for Symbol Resolution
13.2.1    External Symbol Entry (EXTR)
13.3    Symbol Resolution Usage
13.3.1    Library Search
13.3.2    Resolution of Symbols with Common Storage Class
13.3.3    Mangling and Demangling
13.3.4    Mixed Language Resolution
13.3.5    TLS Symbols
14    Dynamic Loading Information
14.1    New or Changed Dynamic Loading Information Features
14.2    Structures, Fields, and Values for Dynamic Loading Information
14.2.1    Dynamic Header Entry
14.2.2    Dynamic Symbol Entry
14.2.3    Dynamic Relocation Entry
14.2.4    Msym Table Entry
14.2.5    Library List Entry
14.2.6    Conflict Entry
14.2.7    GOT Entry
14.2.8    Hash Table Entry
14.2.9    Dynamic String Table
14.3    Dynamic Loading Information Usage
14.3.1    Shared Object Identification
14.3.2    Shared Library Dependencies    Identification    Searching    Validation    Backward Compatibility    Loading    Dynamic Loading and Unloading
14.3.3    Dynamic Symbol Information    Finding Symbol Addresses    Scope and Binding    Multiple GOT Representation    Msym Table    Hash Table
14.3.4    Dynamic Symbol Resolution    Symbol Preemption and Namespace Pollution    Weak Symbols    Search Order    Precedence    Lazy Text Resolution    Levels of Resolution
14.3.5    Dynamic Relocation
14.3.6    Quickstart    Quickstart Levels    Conflict Table    Repairing Quickstart
15    Comment Section
15.1    New and Changed Comment Section Features
15.2    Structures, Fields, and Values of the Comment Section
15.2.1    Subsection Headers
15.2.2    Tag Descriptor Entry    Comment Section Flags
15.3    Comment Section Usage
15.3.1    Comment Section Formatting Requirements
15.3.2    Comment Section Contents
15.3.3    Comment Section Processing
15.3.4    Special Comment Subsections    Tag Descriptors (CM_TAGDESC)    Tool Version Information (CM_TOOLVER)
16    Archives
16.1    New and Changed Archive Features
16.2    Structures, Fields, and Values for Archives
16.2.1    Archive Magic String
16.2.2    Archive Header
16.2.3    Hash Table (ranlib) Structure
16.3    Archive Implementation
16.3.1    Archive File Format
16.3.2    Symdef File Implementation
16.4    Archive Usage
16.4.1    Role As Libraries
16.4.2    Portability
17    Symbol Table Examples
17.1    C
17.1.1    Unnamed Structure
17.2    C++
17.2.1    Base and Derived Classes
17.2.2    Virtual Function Tables and Interludes
17.2.3    Namespace Definitions and Uses
17.2.4    Unnamed Namespaces
17.2.5    Namespace Aliases
17.2.6    Exception-Handling
17.3    Fortran
17.3.1    Common Data
17.3.2    Alternate Entry Points
17.3.3    Array Descriptors
17.3.4    Fortran Modules
17.3.5    Contained Procedures in Fortran Modules
17.3.6    Interface Declarations in Fortran Modules
17.3.7    Generic Interfaces in Fortran Modules
17.4    Pascal
17.4.1    Sets
17.4.2    Subranges
17.4.3    Variant Records
18    Programming Examples
18.1    Packed Line Numbers
18.2    Extended Source Location Information
18.3    Mapping GOT Addresses to Dynamic Symbol Entries
1-1    Object File Producers and Consumers
1-2    Object File Contents
1-3    Object File Compression
1-4    LEB 128 Byte
1-5    LEB 128 Multi-Byte Data
1-6    Little Endian Byte Ordering
2-1    OMAGIC Layout
2-2    NMAGIC Layout
2-3    ZMAGIC Layout for Shared Object
2-4    ZMAGIC Layout for Static Executable Objects
2-5    Address Space Layout
2-6    TASO Address Space Layout
2-7    GP (Global Pointer) Ranges
3-1    Raw Data Sections of an Object File
3-2    INIT/FINI Routines in Shared Objects
3-3    INIT/FINI Recognition in Archive Libraries
3-4    INIT/FINI Example (I)
3-5    INIT/FINI Example (II)
3-6    INIT/FINI Example (III)
3-7    INIT/FINI Example (IV)
3-8    Data and Bss Segment Layout (1)
3-9    Data and Bss Segment Layout (II)
3-10    Exception-Handling Data Structures
3-11    Thread Local Storage Data Structures
4-1    Kinds of Relocations
4-2    Section Relocation Information in an Object File
4-3    Relocation Entry
4-4    External Relocation Entry
4-5    Processing an External Relocation Entry
4-6    Local Relocation Entry
4-7    Processing a Local Relocation Entry
4-8    Relocation Entry Ordering Requirements
6-1    Symbol Table Sections
6-2    Symbol Table Hierarchy
6-3    Relative File Descriptor Table Example
6-4    Optimization Symbols Section
7-1    Line Number Table
7-2    Line Number Byte Format
7-3    Line Number 3-Byte Extended Format
7-4    ESLI Data Mode Bytes
7-5    ESLI Command Byte
8-1    Fixed-Size Stack Frame
8-2    Variable-Size Stack Frame
8-3    Representation of Uplevel Reference
11-1    st/sc Combination Matrix
11-2    Basic Scopes
11-3    Procedure Representation
11-4    Procedure with No Text
11-5    File Representation
11-6    Block Representation
11-7    C++ Namespace Representation
11-8    Fortran 90 Module Representation
11-9    Fortran 90 Module with Interface Declaration
11-10    Fortran 90 Module USE (ALL) Representation
11-11    Fortran 90 Module USE with Renaming
11-12    Fortran 90 Module USE (ONLY) Representation
11-13    Fortran 90 Generic Interface Representation
11-14    C++ Exception Handler Representation
11-15    Fortran Common Block Representation
11-16    Alternate Entry Point Representation
11-17    Auxiliary Table Interpretation
11-18    Auxiliary Table "ti" Interpretation
11-19    Auxiliary Table "arrays" Interpretation
11-20    Auxiliary Table "bt vals" Interpretation
11-21    Auxiliary Table Range Interpretation
11-22    Auxiliary Table RNDXR Interpretation
11-23    Pointer Representation
11-24    Array Representation
11-25    64-Bit Array Representation
11-26    Structure Representation
11-27    Recursive Structure Representation
11-28    Nested Structure Representation
11-29    Typedef Representation
11-30    Function Pointer Representation
11-31    Function Pointer Alternate Representation
11-32    Class Representation
11-33    Empty Class or Structure (C++)
11-34    Opaque Class or Structure (C++)
11-35    Base Class Representation
11-36    Interlude Representation
11-37    Array Descriptor Representation
11-38    Array Descriptor Representation (retired)
11-39    Variant Record Representation
11-40    Variant Record Representation (retired)
11-41    Subrange Representation
11-42    64-bit Range Representation
11-43    Set Representation
14-1    Dynamic Object File Sections
14-2    Shared Library Dependencies
14-3    Valid Shared Library with Multiple Versions
14-4    Invalid Shared Library with Multiple Versions
14-5    Dynamic Symbol Table and Multiple-GOT
14-6    Msym Table
14-7    Hash Table
14-8    Hashing Example
14-9    Namespace Pollution
14-10    Weak Symbol Resolution (I)
14-11    Weak Symbol Resolution (II)
14-12    Symbol Resolution Search Order
14-13    Conflict Entry Example
15-1    Comment Section Data Organization
16-1    Archive File Organization
16-2    Symdef File Hash Table
1-1    COFF Basic Abstract Types
2-1    File Header Magic Numbers
2-2    File Header Flags
2-3    __EXEC_FLAGS flags
2-4    Build Revision Constants
2-5    a.out Header Magic Numbers
2-6    Section Header Constants for Section Names
2-7    Section Flags (s_flags field)
2-8    Special Symbols
3-1    Segment Access Permissions
4-1    Section Numbers for Local Relocation Entries
4-2    Relocation Types
4-3    Literal Usage Types
4-4    Immediate Relocation Types
4-5    R_GPDISP Flags
5-1    Compact Relocation Version Identifiers
6-1    Optimization Tag Values
6-2    Symbol Table Sections Produced at Various Compilation Levels
7-1    Line Number Example
7-2    ESLI Commands
7-3    ESLI Example
8-1    Source Language (lang) Constants
10-1    Architecture and Tuning Values
10-2    Object Annotation OS Revisions
11-1    Symbol Type (st) Constants
11-2    Storage Class (sc) Constants
11-3    Use Module Constants
11-4    Basic Type (bt) Constants
11-5    Type Qualifier (tq) Constants
11-6    Valid Placement for st/sc Combinations
11-7    Symbols with Auxiliary Type Descriptions
11-8    Special Debug Symbols
12-1    Semantic Event Codes
12-2    Split Lifetime Target Type Codes
12-3    Split Lifetime Target Scheme Codes
14-1    Dynamic Array Tags (d_tag)
14-2    DT_FLAGS Flags
14-3    Dynamic Symbol Type (st_info) Constants
14-4    Dynamic Symbol Binding (st_info) Constants
14-5    Dynamic Section Index (st_shndx) Constants
14-6    Library List Flags
14-7    Dynamic Symbol Categories
15-1    Comment Section Tag Values
15-2    Strip Flags
15-3    Combine Flags
15-4    Modify Flags
15-5    Default System Tag Flags
16-1    Archive Magic Strings