SPRU514Z July 2001 – October 2023 SM320F28335-EP
The following tables list the linker options. See Chapter 4 of this document and the TMS320C28x Assembly Language Tools User's Guide for details on these options.
Option | Alias | Description |
---|---|---|
--run_linker | -z | Enables linking. |
--output_file=file | -o | Names the executable output file. The default filename is a .out file. |
--map_file=file | -m | Produces a map or listing of the input and output sections, including holes, and places the listing in file. |
--stack_size=size | [-]-stack | Sets C system stack size to size words and defines a global symbol that specifies the stack size. Default = 1K words. |
--heap_size=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. |
--warn_sections | -w | Displays a message when an undefined output section is created. |
Option | Alias | Description |
---|---|---|
--library=file | -l | Names an archive library or link command file as linker input. |
--disable_auto_rts | Disables the automatic selection of a run-time-support library. See Section 4.3.1.1. | |
--priority | -priority | Satisfies unresolved references by the first library that contains a definition for that symbol. |
--reread_libs | -x | Forces rereading of libraries, which resolves back references. |
--search_path=pathname | -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. |
Option | Alias | Description |
---|---|---|
--define=name=value | Predefines name as a preprocessor macro. | |
--undefine=name | Removes the preprocessor macro name. | |
--disable_pp | Disables preprocessing for command files. |
Option | Alias | Description |
---|---|---|
--diag_error=num | Categorizes the diagnostic identified by num as an error. | |
--diag_remark=num | Categorizes the diagnostic identified by num as a remark. | |
--diag_suppress=num | Suppresses the diagnostic identified by num. | |
--diag_warning=num | Categorizes the diagnostic identified by num as a warning. | |
--display_error_number | Displays a diagnostic's identifiers along with its text. | |
--emit_references:file[=file] | Emits a file containing section information. The information includes section size, symbols defined, and references to symbols. | |
--emit_warnings_as_errors | -pdew | Treat warnings as errors. |
--issue_remarks | Issues remarks (non-serious warnings). | |
--no_demangle | Disables demangling of symbol names in diagnostic messages. | |
--no_warnings | Suppresses diagnostic warnings (errors are still issued). | |
--set_error_limit=count | Sets the error limit to count. The linker abandons linking after this number of errors. (The default is 100.) | |
--verbose_diagnostics | Provides verbose diagnostic messages that display the original source with line-wrap. |
Option | Alias | Description |
---|---|---|
--absolute_exe | -a | Produces an absolute, executable object file. This is the default; if neither --absolute_exe nor --relocatable is specified, the linker acts as if --absolute_exe were specified. |
--ecc={ on | off } | Enable linker-generated Error Correcting Codes (ECC). The default is off. | |
--ecc:data_error | Inject specified errors into the output file for testing. | |
--ecc:ecc_error | Inject specified errors into the Error Correcting Code (ECC) for testing. | |
--mapfile_contents=attribute | Controls the information that appears in the map file. | |
--relocatable | -r | Produces a nonexecutable, relocatable output object file. |
--run_abs | -abs | Produces an absolute listing file. |
--xml_link_info=file | Generates a well-formed XML file containing detailed information about the result of a link. |
Option | Alias | Description |
---|---|---|
--entry_point=symbol | -e | Defines a global symbol that specifies the primary entry point for the executable object file. |
--globalize=pattern | Changes the symbol linkage to global for symbols that match pattern. | |
--hide=pattern | Hides symbols that match the specified pattern. | |
--localize=pattern | Make the symbols that match the specified pattern local. | |
--make_global=symbol | -g | Makes symbol global (overrides -h). |
--make_static | -h | Makes all global symbols static. |
--no_sym_merge | -b | Disables merge of symbolic debugging information in COFF object files. |
--no_symtable | -s | Strips symbol table information and line number entries from the executable object file. |
--retain | Retains a list of sections that otherwise would be discarded. (EABI only) | |
--scan_libraries | -scanlibs | Scans all libraries for duplicate symbol definitions. |
--symbol_map=refname=defname | Specifies a symbol mapping; references to the refname symbol are replaced with references to the defname symbol. The --symbol_map option is supported when used with --opt_level=4. | |
--undef_sym=symbol | -u | Adds symbol to the symbol table as an unresolved symbol. |
--unhide=pattern | Excludes symbols that match the specified pattern from being hidden. |
Option | Alias | Description |
---|---|---|
--arg_size=size | --args | Reserve size bytes for the argc/argv memory area. |
--cinit_compression[=type] | Specifies the type of compression to apply to the C auto initialization data. The default if this option is specified with no type is lzss for Lempel-Ziv-Storer-Szymanski compression. (EABI only) | |
--copy_compression[=type] | Compresses data copied by linker copy tables. The default if this option is specified with no type is lzss for Lempel-Ziv-Storer-Szymanski compression. (EABI only) | |
--fill_value=value | -f | Sets default fill value for holes within output sections |
--ram_model | -cr | Initializes variables at load time. See Section 4.3.5 for details. |
--rom_model | -c | Autoinitializes variables at run time. See Section 4.3.5 for details. |
Option(1) | Alias | Description |
---|---|---|
--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) | |
--no_postlink_across_calls | -nf | Disable post-link optimizations across functions. (Requires use of -plink) |
--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) | |
--postlink_exclude | -ex | Exclude files from post-link pass. (Requires use of -plink) |
--postlink_opt | -plink | Post-link optimizations (only after -z). |
Option | Alias | Description |
---|---|---|
--compress_dwarf[=off|on] | Aggressively reduces the size of DWARF information from input object files. Default is off. | |
--disable_clink | -j | Disables conditional linking of COFF object files. (COFF only) |
--linker_help | [-]-help | Displays information about syntax and available options. |
--preferred_order=function | Prioritizes placement of functions. | |
--unused_section_elimination[=off|on] | Eliminates sections that are not needed in the executable module. Default is on. (EABI only) | |
--zero_init=[off|on] | Controls preinitialization of uninitialized variables. Default is on. Always off if --ram_model is used. (EABI only) |