SPRU513AA July 2001 – March 2026 SM320F28335-EP
Linker options control linking operations. They can be placed on the command line or in a command file. Linker options must be preceded by a hyphen (-). Options can be separated from arguments (if they have them) by an optional space.
| Option | Alias | Description | Section |
|---|---|---|---|
| --run_linker | -z | Enables linking | Section 8.3 |
| --output_file | -o | Names the executable output module. The default filename is a.out. | Section 8.4.24 |
| --map_file | -m | Produces a map or listing of the input and output sections, including holes, and places the listing in filename | Section 8.4.19 |
| --stack_size | -stack | Sets C system stack size to size words and defines a global symbol that specifies the stack size. Default = 1K words | Section 8.4.30 |
| --heap_size | -heap | Sets heap size (for the dynamic memory allocation in C) to sizewords and defines a global symbol that specifies the heap size. Default = 1K words | Section 8.4.15 |
| Option | Alias | Description | Section |
|---|---|---|---|
| --library | -l | Names an archive library or link command filename as linker input | Section 8.4.17 |
| --disable_auto_rts | Disables the automatic selection of a run-time-support library | Section 8.4.8 | |
| --priority | -priority | Satisfies unresolved references by the first library that contains a definition for that symbol | Section 8.4.17.3 |
| --reread_libs | -x | Forces rereading of libraries, which resolves back references | Section 8.4.17.3 |
| --search_path | -i | Alters library-search algorithms to look in a directory named with pathname before looking in the default location. This option must appear before the --library option. | Section 8.4.17.1 |
| --start-group --end-group |
Create a group of libraries to be used together to resolve references. | Section 8.4.17.4 |
| Option | Alias | Description | Section |
|---|---|---|---|
| --define | Predefines name as a preprocessor macro. | Section 8.4.11 | |
| --undefine | Removes the preprocessor macro name. | Section 8.4.11 | |
| --disable_pp | Disables preprocessing for command files | Section 8.4.11 |
| Option | Alias | Description | Section |
|---|---|---|---|
| --diag_error | Categorizes the diagnostic identified by num as an error | Section 8.4.7 | |
| --diag_remark | Categorizes the diagnostic identified by num as a remark | Section 8.4.7 | |
| --diag_suppress | Suppresses the diagnostic identified by num | Section 8.4.7 | |
| --diag_warning | Categorizes the diagnostic identified by num as a warning | Section 8.4.7 | |
| --display_error_number | Displays a diagnostic's identifiers along with its text | Section 8.4.7 | |
| --emit_references:file[=file] | Emits a file containing section information. The information includes section size, symbols defined, and references to symbols. | Section 8.4.7 | |
| --emit_warnings_as_errors | -pdew | Treats warnings as errors | Section 8.4.7 |
| --issue_remarks | Issues remarks (nonserious warnings) | Section 8.4.7 | |
| --no_demangle | Disables demangling of symbol names in diagnostics | Section 8.4.21 | |
| --no_warnings | Suppresses warning diagnostics (errors are still issued) | Section 8.4.7 | |
| --set_error_limit | Sets the error limit to num. The linker abandons linking after this number of errors. (The default is 100.) | Section 8.4.7 | |
| --verbose_diagnostics | Provides verbose diagnostics that display the original source with line-wrap | Section 8.4.7 | |
| --warn_sections | -w | Displays a message when an undefined output section is created | Section 8.4.33 |
| Option | Alias | Description | Section |
|---|---|---|---|
| --absolute_exe | -a | Produces an absolute, executable module. This is the default; if neither --absolute_exe nor --relocatable is specified, the linker acts as if --absolute_exe were specified. | Section 8.4.3.1 |
| --ecc={ on | off } | Enable linker-generated Error Correcting Codes (ECC). The default is off. | Section 8.4.12 Section 8.5.10 |
|
| --ecc:data_error | Inject the specified errors into the output file for testing | Section 8.4.12 Section 8.5.10 |
|
| --ecc:ecc_error | Inject the specified errors into the Error Correcting Code (ECC) for testing | Section 8.4.12 Section 8.5.10 |
|
| --mapfile_contents | Controls the information that appears in the map file. | Section 8.4.20 | |
| --relocatable | -r | Produces a nonexecutable, relocatable output module | Section 8.4.3.2 |
| --run_abs | -abs | Produces an absolute listing file | Section 8.4.28 |
| --xml_link_info | Generates a well-formed XML file containing detailed information about the result of a link | Section 8.4.34 |
| Option | Alias | Description | Section |
|---|---|---|---|
| --entry_point | -e | Defines a global symbol that specifies the primary entry point for the output module | Section 8.4.13 |
| --globalize | Changes the symbol linkage to global for symbols that match pattern | Section 8.4.18 | |
| --hide | Hides global symbols that match pattern | Section 8.4.16 | |
| --localize | Changes the symbol linkage to local for symbols that match pattern | Section 8.4.18 | |
| --make_global | -g | Makes symbol global (overrides -h) | Section 8.4.18.1 |
| --make_static | -h | Makes all global symbols static | Section 8.4.18.1 |
| --no_sym_merge | -b | Disables merge of symbolic debugging information in COFF object files | Section 8.4.22 |
| --no_symtable | -s | Strips symbol table information and line number entries from the output module | Section 8.4.23 |
| --retain | Retains a list of sections that otherwise would be discarded. (EABI only) | Section 8.4.27 | |
| --scan_libraries | -scanlibs | Scans all libraries for duplicate symbol definitions | Section 8.4.29 |
| --symbol_map | Maps symbol references to a symbol definition of a different name | Section 8.4.31 | |
| --undef_sym | -u | Places an unresolved external symbol into the output module's symbol table | Section 8.4.32 |
| --unhide | Reveals (un-hides) global symbols that match pattern | Section 8.4.16 |
| Option | Alias | Description | Section |
|---|---|---|---|
| --arg_size | --args | Allocates memory to be used by the loader to pass arguments | Section 8.4.4 |
| --fill_value | -f | Sets default fill values for holes within output sections; fill_value is a 32-bit constant | Section 8.4.14 |
| --ram_model | -cr | Initializes variables at load time | Section 8.4.26 |
| --rom_model | -c | Autoinitializes variables at run time | Section 8.4.26 |
| Option | Alias | Description | Section |
|---|---|---|---|
| --cinit_compression [=compression_kind] | Specifies the type of compression to apply to the C auto initialization data. The default compression_kind if this option is used with no kind specified is lzss for Lempel-Ziv-Storer-Szymanski compression. Alternately, specify --cinit_compression=rle to use Run Length Encoded compression, which generally provides less efficient compression. (EABI only) | Section 8.4.5 | |
| --compress_dwarf | Aggressively reduces the size of DWARF information from input object files. (EABI only) | Section 8.4.6 | |
| --copy_compression [=compression_kind] | Compresses data copied by linker copy tables. (EABI only) | Section 8.4.5 | |
| --honor_cmdfile_order | Place output sections in the order listed in the linker command file. If the linker command file specifies specific memory addresses for certain sections, those locations are honored, then the command file order is used for any remaining sections. If this option is not specified, the default is to place output sections in an order that optimizes memory usage. | -- | |
| --unused_section_elimination | Eliminates sections that are not needed in the executable module; on by default. (EABI only) | Section 8.4.10 | |
| --keep_asm | Retain any post-link files (.pl) and .absolute listing files (.abs) generated by the −plink option. This allows you to view any changes the post-link optimizer makes. (Requires use of -plink) | Note (1) | |
| --no_postlink_across_calls | -nf | Disable post-link optimizations across functions. (Requires use of -plink) | Note (1) |
| --plink_advice_only | Annotates assembly code with comments if changes cannot be made safely due to pipeline considerations, such as when float support or VCU support is enabled. (Requires use of -plink) | Note (1) | |
| --postlink_exclude | -ex | Exclude files from post-link pass. (Requires use of -plink) | Note (1) |
| --postlink_opt | -plink | Post-link optimizations. (Only after --run_linker or -z) | Note (1) |
| Option | Alias | Description | Section |
|---|---|---|---|
| --disable_clink | -j | Disables conditional linking of COFF object modules. (COFF only) | Section 8.4.9 |
| --linker_help | -help | Displays information about syntax and available options | – |
| --preferred_order | Prioritizes placement of functions | Section 8.4.25 | |
| --zero_init | Controls preinitialization of uninitialized variables. Default is on.Always off if --ram_model is used. (EABI only) | Section 8.4.35 |