‑‑section_prefix
Syntax
‑‑section_prefix=prefixDescription
The compiler places functions and data objects into named sections which are referred to by the IAR ILINK Linker. Use this option to change the name of sections that are not explicitly named using the @ notation or the #pragma location directive.
This option creates section names by putting a prefix before the default name for the section type. This makes it possible to use different section-selectors for different purposes. You can use tcm.* in the example below to match the prefix or, for example, *.bss to match sections with zero-initialized data.
Note
Any changes to the section names require corresponding modifications in the linker configuration file.
Example
Specifying ‑‑section_prefix=tcm places:
code in
tcm.textinstead of.textread-only data in
tcm.rodatainstead of.rodatazero-initialized data in
tcm.bssinstead of.bssother initialized data in
tcm.datainstead of.data
See also
Controlling data and function placement in memory.
Caution
To set this option, use Project>Options>C/C++ Compiler>Extra Options.