The Standard S32DS C/C++ Linker page displays the build configuration settings that apply to the C/C++ linker tool.
| Setting | Description |
|---|---|
| Command | The command pattern for the ${COMMAND} variable. This variable
is used in the Command line pattern field (below). Default
patterns:
The pattern uses the build variables specified on the Cross Settings page. |
| All options | This read-only field shows all flags specified on all pages of the C/C++ linker tool settings. The C/C++ linker will be called with these flags at build time. |
| Command line pattern | The command line pattern to call the C/C++ linker tool. Default: ${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} |
The General page specifies the general properties of the Standard S32DS C/C++ Linker tool.
| Setting | Description |
|---|---|
|
Do not use standard start files (-nostartfiles) |
This option configures the linker to not use the standard system startup files when linking. |
|
Do not use default libraries (-nodefaultlibs) |
This option configures the linker to not use the standard system libraries (such as newlib) when linking. Only the customer-specified libraries can be passed to the linker. |
|
No startup or default libs (-nostdlib) |
This option configures the linker to not use the standard system startup files and libraries when linking. Only the customer-specified libraries can be passed to the linker. |
|
Omit all symbols information (-s) |
This option configures the linker to remove all symbol table and relocation table information from the executable. |
|
No shared libraries (-static) |
This option prevents linking with the shared libraries. This option makes sense
on systems that support dynamic linking. Note: The current version of S32 Design Studio supports linking with the shared libraries for the
Cortex-A53 Linux processors only. For all other processors only the static libraries
linking is supported.
|
| Script files (-T) | The linker script. |
The Libraries page specifies custom libraries and their locations to be used by the Standard S32DS C/C++ Linker tool during compilation.
| Setting | Description |
|---|---|
| Libraries (-l) | The custom libraries to be linked to the application. The libraries will be linked in the top-down order they follow in the list. |
| Library search path (-L) | The file paths where the linker looks for custom libraries specified in the Libraries (-l) field. The linker searches the paths in the order they follow in the list. |
The Miscellaneous page specifies additional linker-specific flags and options not directly related to linking.
| Settings | Description |
|---|---|
| Linker flags | Additional command line options (flags). You can specify any required options supported by the GNU linker and not otherwise available on this page. Consult the documentation at the GNU Binutils site. |
| Other options
(-Xlinker [option]) |
System-specific linker options that GCC does not recognize. You can specify any
options supported by the GNU linker and not otherwise available on this page. To specify options that take their arguments after the equal sign, specify the option and its argument as a single item. For example, to compress the debug section, add --compress-debug-sections=zlib. To specify options that take arguments after the space, add the option first, and then add the argument as an item that follows the option in the list. For example, to specify that armelfd emulation mode to be used, add -m as a single item, and then add armelfd as the item that follows. |
| Other objects | The prioritized list of object file paths to be used when linking. The added
paths are stores in the {application}.args file located in the
Debug folder of the project. If you add a relative path that starts with a period, put the path string in quotes. |
| Generate map | The name of the MAP file to be generated by the linker. The generated MAP file
lists the resource data in the ELF file. The MAP file is located in the Debug folder
of the project structure. To instruct the linker to not generate the MAP file but print the resource information to the console, leave this setting blank. Default: $ {BuildArtifactFileBaseName}.map |
| Cross reference
(-Xlinker --cref) |
This option instructs the linker to print the cross reference table. If the
Generate map setting (above) specifies the file name, the
table is printed to the specified MAP file. Otherwise, the table is printed to the
console. This cross reference table includes the “symbol - files” pairs. The symbols are sorted in alphabetical order, each followed by the file paths where this symbol is defined. |
| Print link map
(-Xlinker --printf-map) |
This option instructs the linker to print the resource map to the console if the
Generate map setting (above) is blank. If the Generate map setting specifies the MAP file name, the linker ignores this option and prints the resource information to the MAP file. |
| Remove unused sections
(-Xlinker --gc-sections) |
This option removes unused sections of code and data from the binary artifact. |
| Print removed sections
(-Xlinker --print-gc-sections) |
This option instructs the linker to print the removed sections to the Console
view. This option makes sense if the Remove unused sections option (above) is enabled. |
| Support print float format for newlib_nano library
(-u_printf_float) |
This option enables printing of floating-point formatted numbers to the console.
This option assumes that semihosting is enabled and the system write function is
provided by the debugger. This option is grayed out by default. To make it available, set Library support to newlib_nano Debugger Console on the Target processor page. When enabled, this option increases the heap and stack size. |
| Support scan float format for newlib_nano library
(-u_scanf_float) |
This option enables scanning of floating-point formatted numbers from the
console. This option assumes that semihosting is enabled and the system read function
is provided by the debugger. This option is grayed out by default. To make it available, set Library support to newlib_nano Debugger Console on the Target processor page. When enabled, this option increases the heap and stack size. |
| Turn off page alignment of sections (-n) | This option disables page alignment for sections of code. Default: enabled. |
| EWL print formats | Not used in the current version of the product. This option specifies the print format for numbers. Options: none, int, int_FP, int_LL_FP. Default: none. This option is grayed out by default. To make it available, set Library support to ewl_nano_c Debugger Console/newlib_nano_c++ Debugger Console on the Target processor page. |
| EWL scan formats | Not used in the current version of the product. This option specifies the scan format for numbers. Options: none, int, int_FP, int_LL_FP. Default: none. This option is grayed out by default. To make it available, set Library support to ewl_nano_c Debugger Console/newlib_nano_c++ Debugger Console on the Target processor page. |
The Link Order page specifies the order in which input files are passed to the linker.
| Setting | Description |
|---|---|
| Customize linker input order | This option enables you to reorder files in the list (below). |
| Link Order | The prioritized list of files that are passed to the linker as inputs. |