- IAR Embedded Workbench for RL78 5.20
- IAR C/C++ Development
- The linker configuration file
- Using symbols, expressions, and numbers
- Symbols in linker configuration files
Symbols in linker configuration files
ILINK supports three different types of symbols in the configuration file:
Config symbols (
define symboldirective)Config symbols:
are only used inside the linker configuration file, and their value never escapes the configuration file.
are evaluated when they are defined.
can only refer to constants and other exported or config symbols.
Exported symbols (
define exported symboldirective)Exported symbols are like config symbols, but their value can be accessed from your application, and they will be present in the final symbol table.
Image symbols (
define image symboldirective)Image symbols are evaluated after placement has been performed. They can use the value of any public label in your application, but cannot be used for placement purposes. They can be accessed from the application and will be present in the final symbol table.
Some guidelines:
If you want to set up a symbol for configuration purposes (defining the start address of regions, the size of blocks, etc.), you should use a config symbol (or possibly an exported symbol) because image symbols are not available until after placement has been performed.
If you want to refer to the address of content (for functions, variables, or blocks) you must use image symbols, because the other symbol types cannot refer to symbols defined in your application.
If you just want to define a symbol and have it appear in the application image, you can use either an exported symbol or an image symbol (but not a config symbol, because config symbols are not exported).