- IAR Embedded Workbench for RL78 5.20
- IAR C/C++ Development
- The linker configuration file
- Using symbols, expressions, and numbers
- Expressions in linker configuration files
Expressions in linker configuration files
Syntax
An expression is built up of the following constituents:
expressionbinopexpressionunop expressionexpression?expression:expression(expression)numbersymbolfunc-operator
where binop is one of these binary operators:
+, -, *, /, %, <<, >>, <, >, ==, !=, &, ^, |, &&, ||
where unop is one of this unary operators:
+, -, !, ~
where number is a number, see Numbers in linker configuration files
where symbol is a defined symbol, see define symbol directive and ‑‑config_def
and where func-operator is one of these function-like operators, available in all expressions:
| The value of |
| The value of |
| The highest address in the region. |
| True ( |
| True ( |
| The largest of the parameters. |
| The smallest of the parameters. |
| The total size of all ranges in the region. |
| The lowest address in the region. |
where align and expr are expressions, and region is a region expression, see Region expression.
func-operator can also be one of these operators, which are only available in expressions for the size or alignment of a block or overlay, in check that expressions, and in data expressions in define section directives:
| If |
| The alignment of the thread-local storage area. |
| The size of the thread-local storage area. |
Description
In the linker configuration file, an expression is a 65-bit value with the range -2^64 to 2^64. The expression syntax closely follows C syntax with some minor exceptions. There are no assignments, casts, pre or post-operations, and no address operations (*, &, [], ->, and .). Some operations that extract a value from a region expression, etc, use a syntax resembling that of a function call. A boolean expression returns 0 (False) or 1 (True).