SPRUIG8J January   2018  – March 2024

 

  1.   1
  2.   Read This First
    1.     About This Manual
    2.     Notational Conventions
    3.     Related Documentation
    4.     Related Documentation From Texas Instruments
    5.     Trademarks
  3. Introduction to the Software Development Tools
    1. 1.1 Software Development Tools Overview
    2. 1.2 Compiler Interface
    3. 1.3 ANSI/ISO Standard
    4. 1.4 Output Files
  4. Getting Started with the Code Generation Tools
    1. 2.1 How Code Composer Studio Projects Use the Compiler
    2. 2.2 Compiling from the Command Line
  5. Using the C/C++ Compiler
    1. 3.1  About the Compiler
    2. 3.2  Invoking the C/C++ Compiler
    3. 3.3  Changing the Compiler's Behavior with Options
      1. 3.3.1  Linker Options
      2. 3.3.2  Frequently Used Options
      3. 3.3.3  Miscellaneous Useful Options
      4. 3.3.4  Run-Time Model Options
      5. 3.3.5  Selecting Target CPU Version (--silicon_version Option)
      6. 3.3.6  Symbolic Debugging and Profiling Options
      7. 3.3.7  Specifying Filenames
      8. 3.3.8  Changing How the Compiler Interprets Filenames
      9. 3.3.9  Changing How the Compiler Processes C Files
      10. 3.3.10 Changing How the Compiler Interprets and Names Extensions
      11. 3.3.11 Specifying Directories
    4. 3.4  Controlling the Compiler Through Environment Variables
      1. 3.4.1 Setting Default Compiler Options (C7X_C_OPTION)
      2. 3.4.2 Naming One or More Alternate Directories (C7X_C_DIR)
    5. 3.5  Controlling the Preprocessor
      1. 3.5.1  Predefined Macro Names
      2. 3.5.2  The Search Path for #include Files
        1. 3.5.2.1 Adding a Directory to the #include File Search Path (--include_path Option)
      3. 3.5.3  Support for the #warning and #warn Directives
      4. 3.5.4  Generating a Preprocessed Listing File (--preproc_only Option)
      5. 3.5.5  Continuing Compilation After Preprocessing (--preproc_with_compile Option)
      6. 3.5.6  Generating a Preprocessed Listing File with Comments (--preproc_with_comment Option)
      7. 3.5.7  Generating Preprocessed Listing with Line-Control Details (--preproc_with_line Option)
      8. 3.5.8  Generating Preprocessed Output for a Make Utility (--preproc_dependency Option)
      9. 3.5.9  Generating a List of Files Included with #include (--preproc_includes Option)
      10. 3.5.10 Generating a List of Macros in a File (--preproc_macros Option)
    6. 3.6  Passing Arguments to main()
    7. 3.7  Understanding Diagnostic Messages
      1. 3.7.1 Controlling Diagnostic Messages
      2. 3.7.2 How You Can Use Diagnostic Suppression Options
    8. 3.8  Other Messages
    9. 3.9  Generating a Raw Listing File (--gen_preprocessor_listing Option)
    10. 3.10 Using Inline Function Expansion
      1. 3.10.1 Inlining Intrinsic Operators
      2. 3.10.2 Inlining Restrictions
      3. 3.10.3 Unguarded Definition-Controlled Inlining
        1. 3.10.3.1 Using the Inline Keyword
      4. 3.10.4 Guarded Inlining and the _INLINE Preprocessor Symbol
        1. 3.10.4.1 Header File string.h
        2. 3.10.4.2 Library Definition File
    11. 3.11 Using Interlist
    12. 3.12 About the Application Binary Interface
    13. 3.13 Enabling Entry Hook and Exit Hook Functions
  6. Optimizing Your Code
    1. 4.1  Invoking Optimization
    2. 4.2  Controlling Code Size Versus Speed
    3. 4.3  Performing File-Level Optimization (--opt_level=3 option)
      1. 4.3.1 Creating an Optimization Information File (--gen_opt_info Option)
    4. 4.4  Program-Level Optimization (--program_level_compile and --opt_level=3 options)
      1. 4.4.1 Controlling Program-Level Optimization (--call_assumptions Option)
    5. 4.5  Automatic Inline Expansion (--auto_inline Option)
    6. 4.6  Link-Time Optimization (--opt_level=4 Option)
      1. 4.6.1 Option Handling
      2. 4.6.2 Incompatible Types
    7. 4.7  Optimizing Software Pipelining
      1. 4.7.1 Turn Off Software Pipelining (--disable_software_pipeline Option)
      2. 4.7.2 Software Pipelining Information
        1. 4.7.2.1 Software Pipelining Information
        2. 4.7.2.2 Software Pipelining Information Terms
        3. 4.7.2.3 Loop Disqualified for Software Pipelining Messages
        4. 4.7.2.4 Pipeline Failure Messages
        5. 4.7.2.5 Register Usage Table Generated by the --debug_software_pipeline Option
      3. 4.7.3 Collapsing Prologs and Epilogs for Improved Performance and Code Size
        1. 4.7.3.1 Speculative Execution
    8. 4.8  Redundant Loops
    9. 4.9  Indicating Whether Certain Aliasing Techniques Are Used
      1. 4.9.1 Use the --aliased_variables Option When Certain Aliases are Used
    10. 4.10 Prevent Reordering of Associative Floating-Point Operations
    11. 4.11 Using Performance Advice to Optimize Code
      1. 4.11.1 Advice #35000: Use restrict to improve loop performance
    12. 4.12 Using the Interlist Feature With Optimization
    13. 4.13 Debugging and Profiling Optimized Code
      1. 4.13.1 Profiling Optimized Code
    14. 4.14 What Kind of Optimization Is Being Performed?
      1. 4.14.1  Cost-Based Register Allocation
      2. 4.14.2  Alias Disambiguation
      3. 4.14.3  Branch Optimizations and Control-Flow Simplification
      4. 4.14.4  Data Flow Optimizations
      5. 4.14.5  Expression Simplification
      6. 4.14.6  Inline Expansion of Functions
      7. 4.14.7  Function Symbol Aliasing
      8. 4.14.8  Induction Variables and Strength Reduction
      9. 4.14.9  Loop-Invariant Code Motion
      10. 4.14.10 Loop Rotation
      11. 4.14.11 Loop Collapsing and Loop Coalescing
      12. 4.14.12 Unroll-and-jam
      13. 4.14.13 Vectorization (SIMD)
      14. 4.14.14 Instruction Scheduling
      15. 4.14.15 Register Variables
      16. 4.14.16 Register Tracking/Targeting
      17. 4.14.17 Software Pipelining
    15. 4.15 Streaming Engine and Streaming Address Generator
      1. 4.15.1 Streaming Engine Overview
      2. 4.15.2 Theory of Operation for Streaming Engines and Streaming Address Generators
      3. 4.15.3 Streaming Address Generator Overview
      4. 4.15.4 Advantages of Using Streaming Engines and Streaming Address Generators
      5. 4.15.5 Interface for Streaming Engine and Streaming Address Generator
      6. 4.15.6 Parameter Template Configuration
      7. 4.15.7 Using the Streaming Engine
        1. 4.15.7.1 Hard-Coded Intrinsic Operands with the Streaming Engine
      8. 4.15.8 Using the Streaming Address Generator
        1. 4.15.8.1 Vector Predication for Streaming Address Generators
        2. 4.15.8.2 Predicated vs. Unpredicated Streaming Address Stores and Loads
      9. 4.15.9 Automatic Use of Streaming Engine and Streaming Address Generator (--auto_stream Option)
        1. 4.15.9.1 Correctness of Automatic Use of SE and SA
        2. 4.15.9.2 Tuning Automatic Use of SE and SA
    16. 4.16 Nested Loop Controller (NLC)
      1. 4.16.1 Obstacles That May Inhibit Use of NLC
  7. C/C++ Language Implementation
    1. 5.1  Characteristics of C7000 C
      1. 5.1.1 Implementation-Defined Behavior
    2. 5.2  Characteristics of C7000 C++
    3. 5.3  Data Types
      1. 5.3.1 Size of Enum Types
      2. 5.3.2 Vector Data Types
    4. 5.4  File Encodings and Character Sets
    5. 5.5  Keywords
      1. 5.5.1 The complex Keyword
      2. 5.5.2 The const Keyword
      3. 5.5.3 The __cregister Keyword
        1. 5.5.3.1 Define and Use Control Registers
        2. 5.5.3.2 Evaluating Flags in the Flag Status Register (FSR) After Floating Point Operations
      4. 5.5.4 The restrict Keyword
      5. 5.5.5 The volatile Keyword
    6. 5.6  C++ Exception Handling
    7. 5.7  Register Variables and Parameters
    8. 5.8  Pragma Directives
      1. 5.8.1  The CALLS Pragma
      2. 5.8.2  The CLINK Pragma
      3. 5.8.3  The COALESCE_LOOP Pragma
      4. 5.8.4  The CODE_ALIGN Pragma
      5. 5.8.5  The CODE_SECTION Pragma
      6. 5.8.6  The DATA_ALIGN Pragma
      7. 5.8.7  The DATA_MEM_BANK Pragma
        1. 5.8.7.1 Using the DATA_MEM_BANK Pragma
      8. 5.8.8  The DATA_SECTION Pragma
        1. 5.8.8.1 Using the DATA_SECTION Pragma C Source File
        2. 5.8.8.2 Using the DATA_SECTION Pragma C++ Source File
      9. 5.8.9  The Diagnostic Message Pragmas
      10. 5.8.10 The FORCEINLINE Pragma
      11. 5.8.11 The FORCEINLINE_RECURSIVE Pragma
      12. 5.8.12 The FUNC_ALWAYS_INLINE Pragma
      13. 5.8.13 The FUNC_CANNOT_INLINE Pragma
      14. 5.8.14 The FUNC_EXT_CALLED Pragma
      15. 5.8.15 The FUNC_IS_PURE Pragma
      16. 5.8.16 The FUNC_IS_SYSTEM Pragma
      17. 5.8.17 The FUNC_NEVER_RETURNS Pragma
      18. 5.8.18 The FUNC_NO_GLOBAL_ASG Pragma
      19. 5.8.19 The FUNC_NO_IND_ASG Pragma
      20. 5.8.20 The FUNCTION_OPTIONS Pragma
      21. 5.8.21 The INTERRUPT Pragma
      22. 5.8.22 The LOCATION Pragma
      23. 5.8.23 The MUST_ITERATE Pragma
        1. 5.8.23.1 The MUST_ITERATE Pragma Syntax
        2. 5.8.23.2 Using MUST_ITERATE to Expand Compiler Knowledge of Loops
      24. 5.8.24 The NOINIT and PERSISTENT Pragmas
      25. 5.8.25 The NOINLINE Pragma
      26. 5.8.26 The NO_COALESCE_LOOP Pragma
      27. 5.8.27 The NO_HOOKS Pragma
      28. 5.8.28 The once Pragma
      29. 5.8.29 The pack Pragma
      30. 5.8.30 The PROB_ITERATE Pragma
      31. 5.8.31 The RETAIN Pragma
      32. 5.8.32 The SET_CODE_SECTION and SET_DATA_SECTION Pragmas
      33. 5.8.33 The STRUCT_ALIGN Pragma
      34. 5.8.34 The UNROLL Pragma
      35. 5.8.35 The WEAK Pragma
    9. 5.9  The _Pragma Operator
    10. 5.10 Application Binary Interface
    11. 5.11 Object File Symbol Naming Conventions (Linknames)
    12. 5.12 Changing the ANSI/ISO C/C++ Language Mode
      1. 5.12.1 C99 Support (--c99)
      2. 5.12.2 C11 Support (--c11)
      3. 5.12.3 Strict ANSI Mode and Relaxed ANSI Mode (--strict_ansi and --relaxed_ansi)
    13. 5.13 GNU and Clang Language Extensions
      1. 5.13.1 Extensions
      2. 5.13.2 Function Attributes
      3. 5.13.3 For Loop Attributes
      4. 5.13.4 Variable Attributes
      5. 5.13.5 Type Attributes
      6. 5.13.6 Built-In Functions
    14. 5.14 Operations and Functions for Vector Data Types
      1. 5.14.1 Vector Literals and Concatenation
      2. 5.14.2 Unary and Binary Operators for Vectors
      3. 5.14.3 Ternary Operators for Vectors (?:)
      4. 5.14.4 Swizzle Operators for Vectors
      5. 5.14.5 Unsupported Vector Comparison Operators
      6. 5.14.6 Conversion Functions for Vectors
      7. 5.14.7 Re-Interpretation Functions for Vectors
      8. 5.14.8 Vector Predicate Type
        1. 5.14.8.1 Constructing a Vector Predicate Type
        2. 5.14.8.2 Using a Vector Predicate Type
        3. 5.14.8.3 Boolean Vector Types
    15. 5.15 C7000 Intrinsics
      1. 5.15.1 High-Level Overloaded Intrinsics
      2. 5.15.2 Intrinsics Defined for Special Load and Store Instructions
      3. 5.15.3 Direct-Mapped Intrinsics
      4. 5.15.4 Lookup Table and Histogram Intrinsics
      5. 5.15.5 Matrix-Multiply Accelerator (MMA) Intrinsics
      6. 5.15.6 Legacy Intrinsics
    16. 5.16 C7000 Scalable Vector Programming
  8. Run-Time Environment
    1. 6.1 Memory
      1. 6.1.1 Sections
      2. 6.1.2 C/C++ System Stack
      3. 6.1.3 Dynamic Memory Allocation
    2. 6.2 Object Representation
      1. 6.2.1 Data Type Storage
        1. 6.2.1.1 char and short Data Types (signed and unsigned)
        2. 6.2.1.2 enum, int, and long Data Types (signed and unsigned)
        3. 6.2.1.3 long Data Types (signed and unsigned)
        4. 6.2.1.4 float Data Type
        5. 6.2.1.5 double and long double Data Types
        6. 6.2.1.6 Pointer to Data Member Types
        7. 6.2.1.7 Pointer to Member Function Types
        8. 6.2.1.8 Structures and Arrays
      2. 6.2.2 Bit Fields
      3. 6.2.3 Character String Constants
    3. 6.3 Register Conventions
    4. 6.4 Function Structure and Calling Conventions
      1. 6.4.1 How a Function Makes a Call
      2. 6.4.2 How a Called Function Responds
      3. 6.4.3 Accessing Arguments and Local Variables
    5. 6.5 Accessing Linker Symbols in C and C++
    6. 6.6 Run-Time-Support Arithmetic Routines
    7. 6.7 System Initialization
      1. 6.7.1 Boot Hook Functions for System Pre-Initialization
      2. 6.7.2 Automatic Initialization of Variables
        1. 6.7.2.1 Zero Initializing Variables
        2. 6.7.2.2 Direct Initialization
        3. 6.7.2.3 Autoinitialization of Variables at Run Time
        4. 6.7.2.4 Autoinitialization Tables
          1. 6.7.2.4.1 Length Followed by Data Format
          2. 6.7.2.4.2 Zero Initialization Format
          3. 6.7.2.4.3 Run Length Encoded (RLE) Format
          4. 6.7.2.4.4 Lempel-Ziv-Storer-Szymanski Compression (LZSS) Format
        5. 6.7.2.5 Initialization of Variables at Load Time
        6. 6.7.2.6 Global Constructors
  9. Using Run-Time-Support Functions and Building Libraries
    1. 7.1 C and C++ Run-Time Support Libraries
      1. 7.1.1 Linking Code With the Object Library
      2. 7.1.2 Header Files
      3. 7.1.3 Modifying a Library Function
      4. 7.1.4 Support for String Handling
      5. 7.1.5 Minimal Support for Internationalization
      6. 7.1.6 Support for Time and Clock Functions
      7. 7.1.7 Allowable Number of Open Files
      8. 7.1.8 Library Naming Conventions
    2. 7.2 The C I/O Functions
      1. 7.2.1 High-Level I/O Functions
        1. 7.2.1.1 Formatting and the Format Conversion Buffer
      2. 7.2.2 Overview of Low-Level I/O Implementation
        1.       open
        2.       close
        3.       read
        4.       write
        5.       lseek
        6.       unlink
        7.       rename
      3. 7.2.3 Device-Driver Level I/O Functions
        1.       DEV_open
        2.       DEV_close
        3.       DEV_read
        4.       DEV_write
        5.       DEV_lseek
        6.       DEV_unlink
        7.       DEV_rename
      4. 7.2.4 Adding a User-Defined Device Driver for C I/O
        1. 7.2.4.1 Mapping Default Streams to Device
      5. 7.2.5 The device Prefix
        1.       add_device
        2.       291
        3. 7.2.5.1 Program for C I/O Device
    3. 7.3 Handling Reentrancy (_register_lock() and _register_unlock() Functions)
    4. 7.4 Library-Build Process
      1. 7.4.1 Required Non-Texas Instruments Software
      2. 7.4.2 Using the Library-Build Process
        1. 7.4.2.1 Automatic Standard Library Rebuilding by the Linker
        2. 7.4.2.2 Invoking mklib Manually
          1. 7.4.2.2.1 Building Standard Libraries
          2. 7.4.2.2.2 Shared or Read-Only Library Directory
          3. 7.4.2.2.3 Building Libraries With Custom Options
          4. 7.4.2.2.4 The mklib Program Option Summary
      3. 7.4.3 Extending mklib
        1. 7.4.3.1 Underlying Mechanism
        2. 7.4.3.2 Libraries From Other Vendors
  10. Introduction to Object Modules
    1. 8.1 Object File Format Specifications
    2. 8.2 Executable Object Files
    3. 8.3 Introduction to Sections
      1. 8.3.1 Special Section Names
    4. 8.4 How the Linker Handles Sections
      1. 8.4.1 Combining Input Sections
      2. 8.4.2 Placing Sections
    5. 8.5 Symbols
      1. 8.5.1 Local Symbols
      2. 8.5.2 Weak Symbols
    6. 8.6 Loading a Program
  11. Program Loading and Running
    1. 9.1 Loading
    2. 9.2 Entry Point
    3. 9.3 Run-Time Initialization
      1. 9.3.1 The _c_int00 Function
      2. 9.3.2 RAM Model vs. ROM Model
        1. 9.3.2.1 Autoinitializing Variables at Run Time (--rom_model)
        2. 9.3.2.2 Initializing Variables at Load Time (--ram_model)
        3. 9.3.2.3 The --rom_model and --ram_model Linker Options
      3. 9.3.3 About Linker-Generated Copy Tables
        1. 9.3.3.1 BINIT
        2. 9.3.3.2 CINIT
    4. 9.4 Arguments to main
    5. 9.5 Run-Time Relocation
    6. 9.6 Additional Information
  12. 10Archiver Description
    1. 10.1 Archiver Overview
    2. 10.2 The Archiver's Role in the Software Development Flow
    3. 10.3 Invoking the Archiver
    4. 10.4 Archiver Examples
    5. 10.5 Library Information Archiver Description
      1. 10.5.1 Invoking the Library Information Archiver
      2. 10.5.2 Library Information Archiver Example
      3. 10.5.3 Listing the Contents of an Index Library
      4. 10.5.4 Requirements
  13. 11Linking C/C++ Code
    1. 11.1 Invoking the Linker Through the Compiler (-z Option)
      1. 11.1.1 Invoking the Linker Separately
      2. 11.1.2 Invoking the Linker as Part of the Compile Step
      3. 11.1.3 Disabling the Linker (--compile_only Compiler Option)
    2. 11.2 Linker Code Optimizations
      1. 11.2.1 Conditional Linking
      2. 11.2.2 Generating Function Subsections (--gen_func_subsections Compiler Option)
      3. 11.2.3 Generating Aggregate Data Subsections (--gen_data_subsections Compiler Option)
    3. 11.3 Controlling the Linking Process
      1. 11.3.1 Including the Run-Time-Support Library
        1. 11.3.1.1 Automatic Run-Time-Support Library Selection
          1. 11.3.1.1.1 Using the --issue_remarks Option
        2. 11.3.1.2 Manual Run-Time-Support Library Selection
        3. 11.3.1.3 Library Order for Searching for Symbols
      2. 11.3.2 Run-Time Initialization
      3. 11.3.3 Global Object Constructors
      4. 11.3.4 Specifying the Type of Global Variable Initialization
      5. 11.3.5 Specifying Where to Allocate Sections in Memory
      6. 11.3.6 A Sample Linker Command File
  14. 12Linker Description
    1. 12.1  Linker Overview
    2. 12.2  The Linker's Role in the Software Development Flow
    3. 12.3  Invoking the Linker
    4. 12.4  Linker Options
      1. 12.4.1  Wildcards in File, Section, and Symbol Patterns
      2. 12.4.2  Specifying C/C++ Symbols with Linker Options
      3. 12.4.3  Relocation Capabilities (--absolute_exe and --relocatable Options)
        1. 12.4.3.1 Producing an Absolute Output Module (--absolute_exe option)
        2. 12.4.3.2 Producing a Relocatable Output Module (--relocatable option)
      4. 12.4.4  Allocate Memory for Use by the Loader to Pass Arguments (--arg_size Option)
      5. 12.4.5  Compression (--cinit_compression and --copy_compression Option)
      6. 12.4.6  Compress DWARF Information (--compress_dwarf Option)
      7. 12.4.7  Control Linker Diagnostics
      8. 12.4.8  Automatic Library Selection (--disable_auto_rts Option)
      9. 12.4.9  Do Not Remove Unused Sections (--unused_section_elimination Option)
      10. 12.4.10 Linker Command File Preprocessing (--disable_pp, --define and --undefine Options)
      11. 12.4.11 Define an Entry Point (--entry_point Option)
      12. 12.4.12 Set Default Fill Value (--fill_value Option)
      13. 12.4.13 Define Heap Size (--heap_size Option)
      14. 12.4.14 Hiding Symbols
      15. 12.4.15 Alter the Library Search Algorithm (--library, --search_path, and C7X_C_DIR )
        1. 12.4.15.1 Name an Alternate Library Directory (--search_path Option)
        2. 12.4.15.2 Name an Alternate Library Directory ( C7X_C_DIR Environment Variable)
        3. 12.4.15.3 Exhaustively Read and Search Libraries (--reread_libs and --priority Options)
      16. 12.4.16 Change Symbol Localization
        1. 12.4.16.1 Make All Global Symbols Static (--make_static Option)
      17. 12.4.17 Create a Map File (--map_file Option)
      18. 12.4.18 Manage Map File Contents (--mapfile_contents Option)
      19. 12.4.19 Disable Name Demangling (--no_demangle)
      20. 12.4.20 Merging of Symbolic Debugging Information
      21. 12.4.21 Strip Symbolic Information (--no_symtable Option)
      22. 12.4.22 Name an Output Module (--output_file Option)
      23. 12.4.23 Prioritizing Function Placement (--preferred_order Option)
      24. 12.4.24 C Language Options (--ram_model and --rom_model Options)
      25. 12.4.25 Retain Discarded Sections (--retain Option)
      26. 12.4.26 Scan All Libraries for Duplicate Symbol Definitions (--scan_libraries)
      27. 12.4.27 Define Stack Size (--stack_size Option)
      28. 12.4.28 Mapping of Symbols (--symbol_map Option)
      29. 12.4.29 Generate Far Call Trampolines (--trampolines Option)
        1. 12.4.29.1 Advantages and Disadvantages of Using Trampolines
        2. 12.4.29.2 Minimizing the Number of Trampolines Required (--minimize_trampolines Option)
        3. 12.4.29.3 Carrying Trampolines From Load Space to Run Space
      30. 12.4.30 Introduce an Unresolved Symbol (--undef_sym Option)
      31. 12.4.31 Display a Message When an Undefined Output Section Is Created (--warn_sections)
      32. 12.4.32 Generate XML Link Information File (--xml_link_info Option)
      33. 12.4.33 Zero Initialization (--zero_init Option)
    5. 12.5  Linker Command Files
      1. 12.5.1  Reserved Names in Linker Command Files
      2. 12.5.2  Constants in Linker Command Files
      3. 12.5.3  Accessing Files and Libraries from a Linker Command File
      4. 12.5.4  The MEMORY Directive
        1. 12.5.4.1 Default Memory Model
        2. 12.5.4.2 MEMORY Directive Syntax
        3. 12.5.4.3 Expressions and Address Operators
      5. 12.5.5  The SECTIONS Directive
        1. 12.5.5.1 SECTIONS Directive Syntax
        2. 12.5.5.2 Section Allocation and Placement
          1. 12.5.5.2.1 Binding
          2. 12.5.5.2.2 Named Memory
          3. 12.5.5.2.3 Controlling Placement Using The HIGH Location Specifier
            1. 12.5.5.2.3.1 Linker Placement With the HIGH Specifier
            2.         425
            3. 12.5.5.2.3.2 Linker Placement Without HIGH Specifier
          4. 12.5.5.2.4 Alignment and Blocking
          5. 12.5.5.2.5 Alignment With Padding
        3. 12.5.5.3 Specifying Input Sections
          1. 12.5.5.3.1 The Most Common Method of Specifying Section Contents
          2.        431
        4. 12.5.5.4 Using Multi-Level Subsections
        5. 12.5.5.5 Specifying Library or Archive Members as Input to Output Sections
          1. 12.5.5.5.1 Archive Members to Output Sections
          2.        435
        6. 12.5.5.6 Allocation Using Multiple Memory Ranges
        7. 12.5.5.7 Automatic Splitting of Output Sections Among Non-Contiguous Memory Ranges
      6. 12.5.6  Placing a Section at Different Load and Run Addresses
        1. 12.5.6.1 Specifying Load and Run Addresses
        2.       440
      7. 12.5.7  Using GROUP and UNION Statements
        1. 12.5.7.1 Grouping Output Sections Together
        2. 12.5.7.2 Overlaying Sections With the UNION Statement
        3. 12.5.7.3 Using Memory for Multiple Purposes
        4. 12.5.7.4 Nesting UNIONs and GROUPs
        5. 12.5.7.5 Checking the Consistency of Allocators
        6. 12.5.7.6 Naming UNIONs and GROUPs
      8. 12.5.8  Special Section Types (DSECT, COPY, NOLOAD, and NOINIT)
      9. 12.5.9  Assigning Symbols at Link Time
        1. 12.5.9.1 Syntax of Assignment Statements
        2. 12.5.9.2 Assigning the SPC to a Symbol
        3. 12.5.9.3 Assignment Expressions
        4. 12.5.9.4 Symbols Automatically Defined by the Linker
        5. 12.5.9.5 Assigning Exact Start, End, and Size Values of a Section to a Symbol
        6. 12.5.9.6 Why the Dot Operator Does Not Always Work
        7. 12.5.9.7 Address and Dimension Operators
          1. 12.5.9.7.1 Input Items
          2. 12.5.9.7.2 Output Section
          3. 12.5.9.7.3 GROUPs
          4. 12.5.9.7.4 UNIONs
        8. 12.5.9.8 LAST Operator
      10. 12.5.10 Creating and Filling Holes
        1. 12.5.10.1 Initialized and Uninitialized Sections
        2. 12.5.10.2 Creating Holes
        3. 12.5.10.3 Filling Holes
        4. 12.5.10.4 Explicit Initialization of Uninitialized Sections
    6. 12.6  Linker Symbols
      1. 12.6.1 Linker-Defined Functions and Arrays
      2. 12.6.2 Linker-Defined Integer Values
      3. 12.6.3 Linker-Defined Addresses
      4. 12.6.4 More About the _symval Operator
      5. 12.6.5 Using _symval, PC-Relative Addressing, and Far Data
      6. 12.6.6 Weak Symbols
        1. 12.6.6.1 Weak Symbol References
        2. 12.6.6.2 Weak Symbol Definitions
      7. 12.6.7 Resolving Symbols with Object Libraries
    7. 12.7  Default Placement Algorithm
      1. 12.7.1 How the Allocation Algorithm Creates Output Sections
      2. 12.7.2 Reducing Memory Fragmentation
    8. 12.8  Using Linker-Generated Copy Tables
      1. 12.8.1 Using Copy Tables for Boot Loading
      2. 12.8.2 Using Built-in Link Operators in Copy Tables
      3. 12.8.3 Overlay Management Example
      4. 12.8.4 Generating Copy Tables With the table() Operator
        1. 12.8.4.1 The table() Operator
        2. 12.8.4.2 Boot-Time Copy Tables
        3. 12.8.4.3 Using the table() Operator to Manage Object Components
        4. 12.8.4.4 Linker-Generated Copy Table Sections and Symbols
        5. 12.8.4.5 Splitting Object Components and Overlay Management
      5. 12.8.5 Compression
        1. 12.8.5.1 Compressed Copy Table Format
        2. 12.8.5.2 Compressed Section Representation in the Object File
        3. 12.8.5.3 Compressed Data Layout
        4. 12.8.5.4 Run-Time Decompression
        5. 12.8.5.5 Compression Algorithms
        6.       496
      6. 12.8.6 Copy Table Contents
      7. 12.8.7 General Purpose Copy Routine
    9. 12.9  Partial (Incremental) Linking
    10. 12.10 Linking C/C++ Code
      1. 12.10.1 Run-Time Initialization
      2. 12.10.2 Object Libraries and Run-Time Support
      3. 12.10.3 Setting the Size of the Stack and Heap Sections
      4. 12.10.4 Initializing and AutoInitialzing Variables at Run Time
      5. 12.10.5 Constraints Due to CMMU Configuration
    11. 12.11 Linker Example
  15. 13Object File Utilities
    1. 13.1 Invoking the Object File Display Utility
    2. 13.2 Invoking the Disassembler
    3. 13.3 Invoking the Name Utility
    4. 13.4 Invoking the Strip Utility
  16. 14C++ Name Demangler
    1. 14.1 Invoking the C++ Name Demangler
    2. 14.2 Sample Usage of the C++ Name Demangler
  17.   A XML Link Information File Description
    1.     A.1 XML Information File Element Types
    2.     A.2 Document Elements
      1.      A.2.1 Header Elements
      2.      A.2.2 Input File List
      3.      A.2.3 Object Component List
      4.      A.2.4 Logical Group List
      5.      A.2.5 Placement Map
      6.      A.2.6 Far Call Trampoline List
      7.      A.2.7 Symbol Table
  18.   B Unsupported Tools and Features
    1.     B.1 List of Unsupported Tools and Features
  19.   C Glossary
    1.     528
  20.   D Revision History

    alias disambiguation

    A technique that determines when two pointer expressions cannot point to the same location, allowing the compiler to freely optimize such expressions.

    aliasing

    The ability for a single object to be accessed in more than one way, such as when two pointers point to a single object. It can disrupt optimization, because any indirect reference could refer to any other object.

    allocation

    A process in which the linker calculates the final memory addresses of output sections.

    ANSI

    American National Standards Institute; an organization that establishes standards voluntarily followed by industries.

    Application Binary Interface (ABI)

    A standard that specifies the interface between two object modules. An ABI specifies how functions are called and how information is passed from one program component to another.

    archive library

    A collection of individual files grouped into a single file by the archiver.

    archiver

    A software program that collects several individual files into a single file called an archive library. With the archiver, you can add, delete, extract, or replace members of the archive library.

    assembler

    A software program that creates a machine-language program from a source file that contains assembly language instructions, directives, and macro definitions. The assembler substitutes absolute operation codes for symbolic operation codes and absolute or relocatable addresses for symbolic addresses.

    assignment statement

    A statement that initializes a variable with a value.

    autoinitialization

    The process of initializing global C variables (contained in the .cinit section) before program execution begins.

    autoinitialization at run time

    An autoinitialization method used by the linker when linking C code. The linker uses this method when you invoke it with the --rom_model link option. The linker loads the .cinit section of data tables into memory, and variables are initialized at run time.

    big endian

    An addressing protocol in which bytes are numbered from left to right within a word. More significant bytes in a word have lower numbered addresses. Endian ordering is hardware-specific and is determined at reset. See also little endian

    block

    A set of statements that are grouped together within braces and treated as an entity.

    .bss section

    One of the default object file sections. You use the assembler .bss directive to reserve a specified amount of space in the memory map that you can use later for storing data. The .bss section is uninitialized.

    byte

    Per ANSI/ISO C, the smallest addressable unit that can hold a character.

    C/C++ compiler

    A software program that translates C source statements into assembly language source statements.

    code generator

    A compiler tool that takes the file produced by the parser or the optimizer and produces an assembly language source file.

    command file

    A file that contains options, filenames, directives, or commands for the linker or hex conversion utility.

    comment

    A source statement (or portion of a source statement) that documents or improves readability of a source file. Comments are not compiled, assembled, or linked; they have no effect on the object file.

    compiler program

    A utility that lets you compile, assemble, and optionally link in one step. The compiler runs one or more source modules through the compiler (including the parser, optimizer, and code generator), the assembler, and the linker.

    configured memory

    Memory that the linker has specified for allocation.

    constant

    A type whose value cannot change.

    cross-reference listing

    An output file created by the assembler that lists the symbols that were defined, what line they were defined on, which lines referenced them, and their final values.

    .data section

    One of the default object file sections. The .data section is an initialized section that contains initialized data. You can use the .data directive to assemble code into the .data section.

    direct call

    A function call where one function calls another using the function's name.

    directives

    Special-purpose commands that control the actions and functions of a software tool (as opposed to assembly language instructions, which control the actions of a device).

    disambiguation

    See alias disambiguation

    dynamic memory allocation

    A technique used by several functions (such as malloc, calloc, and realloc) to dynamically allocate memory for variables at run time. This is accomplished by defining a large memory pool (heap) and using the functions to allocate memory from the heap.

    ELF

    Executable and Linkable Format; a system of object files configured according to the System V Application Binary Interface specification.

    emulator

    A hardware development system that duplicates the device's operation.

    entry point

    A point in target memory where execution starts.

    environment variable

    A system symbol that you define and assign to a string. Environmental variables are often included in Windows batch files or UNIX shell scripts such as .cshrc or .profile.

    epilog

    The portion of code in a function that restores the stack and returns.

    executable object file

    A linked, executable object file that is downloaded and executed on a target system.

    expression

    A constant, a symbol, or a series of constants and symbols separated by arithmetic operators.

    external symbol

    A symbol that is used in the current program module but defined or declared in a different program module.

    file-level optimization

    A level of optimization where the compiler uses the information that it has about the entire file to optimize your code (as opposed to program-level optimization, where the compiler uses information that it has about the entire program to optimize your code).

    function inlining

    The process of inserting code for a function at the point of call. This saves the overhead of a function call and allows the optimizer to optimize the function in the context of the surrounding code.

    global symbol

    A symbol that is either defined in the current module and accessed in another, or accessed in the current module but defined in another.

    high-level language debugging

    The ability of a compiler to retain symbolic and high-level language information (such as type and function definitions) so that a debugging tool can use this information.

    indirect call

    A function call where one function calls another function by giving the address of the called function.

    initialization at load time

    An autoinitialization method used by the linker when linking C/C++ code. The linker uses this method when you invoke it with the --ram_model link option. This method initializes variables at load time instead of run time.

    initialized section

    A section from an object file that will be linked into an executable object file.

    input section

    A section from an object file that will be linked into an executable object file.

    integrated preprocessor

    A C/C++ preprocessor that is merged with the parser, allowing for faster compilation. Stand-alone preprocessing or preprocessed listing is also available.

    interlist feature

    A feature that inserts as comments your original C/C++ source statements into the assembly language output from the assembler. The C/C++ statements are inserted next to the equivalent assembly instructions.

    intrinsics

    Operators that are used like functions and produce assembly language code that would otherwise be inexpressible in C, or would take greater time and effort to code.

    ISO

    International Organization for Standardization; a worldwide federation of national standards bodies, which establishes international standards voluntarily followed by industries.

    iteration count

    The number of times that a loop executes before it terminates. Previously called the "trip count".

    kernel

    The body of a software-pipelined loop between the pipelined-loop prolog and the pipelined-loop epilog.

    K&R C

    Kernighan and Ritchie C, the de facto standard as defined in the first edition of The C Programming Language (K&R). Most K&R C programs written for earlier, non-ISO C compilers should correctly compile and run without modification.

    label

    A symbol that begins in column 1 of an assembler source statement and corresponds to the address of that statement. A label is the only assembler statement that can begin in column 1.

    linker

    A software program that combines object files to form an executable object file that can be allocated into system memory and executed by the device.

    listing file

    An output file, created by the assembler, which lists source statements, their line numbers, and their effects on the section program counter (SPC).

    little endian

    An addressing protocol in which bytes are numbered from right to left within a word. More significant bytes in a word have higher numbered addresses. Endian ordering is hardware-specific and is determined at reset. See also big endian

    loader

    A device that places an executable object file into system memory.

    loop unrolling

    An optimization that expands small loops so that each iteration of the loop appears in your code. Although loop unrolling increases code size, it can improve the performance of your code.

    macro

    A user-defined routine that can be used as an instruction.

    macro call

    The process of invoking a macro.

    macro definition

    A block of source statements that define the name and the code that make up a macro.

    macro expansion

    The process of inserting source statements into your code in place of a macro call.

    map file

    An output file, created by the linker, which shows the memory configuration, section composition, section allocation, symbol definitions and the addresses at which the symbols were defined for your program.

    memory map

    A map of target system memory space that is partitioned into functional blocks.

    name mangling

    A compiler-specific feature that encodes a function name with information regarding the function's arguments return types.

    object file

    An assembled or linked file that contains machine-language object code.

    object library

    An archive library made up of individual object files.

    operand

    An argument of an assembly language instruction, assembler directive, or macro directive that supplies information to the operation performed by the instruction or directive.

    optimizer

    A software tool that improves the execution speed and reduces the size of C programs.

    options

    Command-line parameters that allow you to request additional or specific functions when you invoke a software tool.

    output section

    A final, allocated section in a linked, executable module.

    parser

    A software tool that reads the source file, performs preprocessing functions, checks the syntax, and produces an intermediate file used as input for the optimizer or code generator.

    partitioning

    The process of assigning a data path to each instruction.

    pipelining

    A technique where a second instruction begins executing before the first instruction has been completed. You can have several instructions in the pipeline, each at a different processing stage.

    pop

    An operation that retrieves a data object from a stack.

    pragma

    A preprocessor directive that provides directions to the compiler about how to treat a particular statement.

    preprocessor

    A software tool that interprets macro definitions, expands macros, interprets header files, interprets conditional compilation, and acts upon preprocessor directives.

    program-level optimization

    An aggressive level of optimization where all of the source files are compiled into one intermediate file. Because the compiler can see the entire program, several optimizations are performed with program-level optimization that are rarely applied during file-level optimization.

    prolog

    The portion of code in a function that sets up the stack.

    push

    An operation that places a data object on a stack for temporary storage.

    quiet run

    An option that suppresses the normal banner and the progress information.

    raw data

    Executable code or initialized data in an output section.

    relocation

    A process in which the linker adjusts all the references to a symbol when the symbol's address changes.

    run-time environment

    The run time parameters in which your program must function. These parameters are defined by the memory and register conventions, stack organization, function call conventions, and system initialization.

    run-time-support functions

    Standard ISO functions that perform tasks that are not part of the C language (such as memory allocation, string conversion, and string searches).

    run-time-support library

    A library file, rts.src, which contains the source for the run time-support functions.

    section

    A relocatable block of code or data that ultimately will be contiguous with other sections in the memory map.

    sign extend

    A process that fills the unused MSBs of a value with the value's sign bit.

    software pipelining

    A technique used by the C/C++ optimizer to schedule instructions from a loop so that multiple iterations of the loop execute in parallel.

    source file

    A file that contains C/C++ code or assembly language code that is compiled or assembled to form an object file.

    stand-alone preprocessor

    A software tool that expands macros, #include files, and conditional compilation as an independent program. It also performs integrated preprocessing, which includes parsing of instructions.

    static variable

    A variable whose scope is confined to a function or a program. The values of static variables are not discarded when the function or program is exited; their previous value is resumed when the function or program is reentered.

    storage class

    An entry in the symbol table that indicates how to access a symbol.

    string table

    A table that stores symbol names that are longer than eight characters (symbol names of eight characters or longer cannot be stored in the symbol table; instead they are stored in the string table). The name portion of the symbol's entry points to the location of the string in the string table.

    subsection

    A relocatable block of code or data that ultimately will occupy continuous space in the memory map. Subsections are smaller sections within larger sections. Subsections give you tighter control of the memory map.

    symbol

    A string of alphanumeric characters that represents an address or a value.

    symbolic debugging

    The ability of a software tool to retain symbolic information that can be used by a debugging tool such as an emulator.

    target system

    The system on which the object code you have developed is executed.

    .text section

    One of the default object file sections. The .text section is initialized and contains executable code. You can use the .text directive to assemble code into the .text section.

    trigraph sequence

    A 3-character sequence that has a meaning (as defined by the ISO 646-1983 Invariant Code Set). These characters cannot be represented in the C character set and are expanded to one character. For example, the trigraph ??' is expanded to ^.

    unconfigured memory

    Memory that is not defined as part of the memory map and cannot be loaded with code or data.

    uninitialized section

    A object file section that reserves space in the memory map but that has no actual contents.

    unsigned value

    A value that is treated as a nonnegative number, regardless of its actual sign.

    variable

    A symbol representing a quantity that can assume any of a set of values.

    word

    A 32-bit addressable location in target memory