www.ti.com
9.2 The Linker's Role in the Software Development Flow .............................................................. 209
9.3 Invoking the Linker ....................................................................................................... 210
9.4 Linker Options ............................................................................................................ 211
9.4.1 Wild Cards in File, Section, and Symbol Patterns .......................................................... 213
9.4.2 Relocation Capabilities (--absolute_exe and --relocatable Options) ..................................... 213
9.4.3 Allocate Memory for Use by the Loader to Pass Arguments (--arg_size Option) ...................... 214
9.4.4 Control Linker Diagnostics ..................................................................................... 215
9.4.5 Disable Automatic Library Selection (--disable_auto_rts Option) ......................................... 215
9.4.6 Disable Conditional Linking (--disable_clink Option) ....................................................... 215
9.4.7 Link Command File Preprocessing (--disable_pp, --define and --undefine Options) ................... 216
9.4.8 Define an Entry Point (--entry_point Option) ................................................................ 217
9.4.9 Set Default Fill Value (--fill_value Option) ................................................................... 217
9.4.10 Define Heap Size (--heap_size Option) ..................................................................... 217
9.4.11 Hiding Symbols ................................................................................................. 217
9.4.12 Alter the Library Search Algorithm (--library Option, --search_path Option, and C55X_C_DIR
Environment Variable) .......................................................................................... 218
9.4.13 Change Symbol Localization ................................................................................. 221
9.4.14 Create a Map File (--map_file Option) ...................................................................... 222
9.4.15 Managing Map File Contents (--mapfile_contents Option) ............................................... 223
9.4.16 Disable Name Demangling (--no_demangle) .............................................................. 224
9.4.17 Disable Merge of Symbolic Debugging Information (--no_sym_merge Option) ....................... 224
9.4.18 Strip Symbolic Information (--no_symtable Option) ....................................................... 224
9.4.19 Name an Output Module (--output_file Option) ............................................................ 225
9.4.20 C Language Options (--ram_model and --rom_model Options) ......................................... 225
9.4.21 Create an Absolute Listing File (--run_abs Option) ........................................................ 225
9.4.22 Scan All Libraries for Duplicate Symbol Definitions (--scan_libraries) .................................. 225
9.4.23 Define Stack Size (--stack_size Option) .................................................................... 225
9.4.24 Enforce Strict Compatibility (--strict_compatibility Option) ................................................ 226
9.4.25 Mapping of Symbols (--symbol_map Option) .............................................................. 226
9.4.26 Define Secondary Stack Size (--sysstack Option) ......................................................... 226
9.4.27 Introduce an Unresolved Symbol (--undef_sym Option) .................................................. 226
9.4.28 Display a Message When an Undefined Output Section Is Created (--warn_sections Option) ..... 227
9.4.29 Generate XML Link Information File (--xml_link_info Option) ............................................ 227
9.5 Byte/Word Addressing ................................................................................................... 227
9.6 Linker Command Files .................................................................................................. 228
9.6.1 Reserved Names in Linker Command Files ................................................................. 229
9.6.2 Constants in Linker Command Files ......................................................................... 229
9.6.3 The MEMORY Directive ........................................................................................ 230
9.6.4 The SECTIONS Directive ...................................................................................... 234
9.6.5 Specifying a Section's Run-Time Address ................................................................... 247
9.6.6 Using UNION and GROUP Statements ...................................................................... 249
9.6.7 Overlaying Pages ............................................................................................... 253
9.6.8 Special Section Types (DSECT, COPY, and NOLOAD) .................................................. 255
9.6.9 Assigning Symbols at Link Time .............................................................................. 256
9.6.10 Creating and Filling Holes .................................................................................... 261
9.7 Object Libraries ........................................................................................................... 264
9.8 Default Allocation Algorithm ............................................................................................ 265
9.8.1 How the Allocation Algorithm Creates Output Sections ................................................... 265
9.8.2 Reducing Memory Fragmentation ............................................................................ 266
9.9 Linker-Generated Copy Tables ........................................................................................ 266
9.9.1 A Current Boot-Loaded Application Development Process ............................................... 266
9.9.2 An Alternative Approach ....................................................................................... 267
9.9.3 Overlay Management Example ............................................................................... 268
6
Contents SPRU280I– November 2011
Submit Documentation Feedback
Copyright © 2011, Texas Instruments Incorporated