SPNU151W January 1998 – March 2023 66AK2E05 , 66AK2H06 , 66AK2H12 , 66AK2H14 , AM1705 , AM1707 , AM1802 , AM1806 , AM1808 , AM1810 , AM5K2E04 , OMAP-L132 , OMAP-L137 , OMAP-L138 , SM470R1B1M-HT , TMS470R1A288 , TMS470R1A384 , TMS470R1A64 , TMS470R1B1M , TMS470R1B512 , TMS470R1B768
The following tables list the linker options. See Chapter 121 of this document and the ARM 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 bytes and defines a global symbol that specifies the stack size. Default = 2K bytes. |
| --heap_size=size | [-]-heap | Sets heap size (for the dynamic memory allocation in C) to sizebytes and defines a global symbol that specifies the heap size. Default = 2K bytes. |
| 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. | |
| --warn_sections | -w | Displays a message when an undefined output section is created. |
| 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. | |
| --generate_dead_funcs_list | Writes a list of the dead functions that were removed by the linker to file fname. | |
| --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_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. | |
| --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_hold_wdt={on|off} | Link in an RTS auto-initialization routine that either holds (on) or does not hold (off) the watchdog timer during cinit auto-initialization. See Section 4.3.3. | |
| -be32 | Forces the linker to generate BE-32 object code. | |
| -be8 | Forces the linker to generate BE-8 object code. | |
| --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. | |
| --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. | |
| --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. |
| --trampolines[=off|on] | Generates far call trampolines (argument is optional, is "on" by default). |
| Option | Alias | Description |
|---|---|---|
| --compress_dwarf[=off|on] | Aggressively reduces the size of DWARF information from input object files. Default is on. | |
| --linker_help | [-]-help | Displays information about syntax and available options. |
| --minimize_trampolines | Places sections to minimize number of far trampolines required. | |
| --preferred_order=function | Prioritizes placement of functions. | |
| --trampoline_min_spacing | When trampoline reservations are spaced more closely than the specified limit, tries to make them adjacent. | |
| --unused_section_elimination[=off|on] | Eliminates sections that are not needed in the executable module. Default is on. | |
| --zero_init=[off|on] | Controls preinitialization of uninitialized variables. Default is on. Always off if --ram_model is used. |