Assigning Symbols at Link Time
7-59
Linker Description
-
Symbols within an expression have only the value of the symbol’s
address. No type-checking is performed.
-
Linker expressions can be absolute or relocatable. If an expression
contains
any relocatable symbols (and zero or more constants or absolute
symbols), it is relocatable. Otherwise, the expression is absolute. If a
symbol is assigned the value of a relocatable expression, it is relocatable;
if it is assigned the value of an absolute expression, it is absolute.
The linker supports the C language operators listed in Table 7–1 in order of
precedence. Operators in the same group have the same precedence.
Besides the operators listed in Table 7–1, the linker also has an
align operator
that allows a symbol to be aligned on an
n-word boundary within an output sec-
tion (
n is a power of 2). For example, the expression
. = align(16);
aligns the SPC within the current section on the next 16-word boundary.
Because the align operator is a function of the current SPC, it can be used only
in the same context as “.” —that is, within a SECTIONS directive.
Table 7–1. Operators Used in Expressions (Precedence)
Symbols
Operators
Evaluation
+ – ~
Unary plus, minus, 1s complement
Right to left
* / %
Multiplication, division, modulo
Left to right
+ –
Addition, subtraction
Left to right
<< >>
Left shift, right shift
Left to right
< <= > >=
Less than, LT or equal, greater than,
GT or equal
Left to right
!=, =[=]
Not equal to, equal to
Left to right
&
Bitwise AND
Left to right
^
Bitwise exclusive OR
Left to right
|
Bitwise OR
Left to right
Note:
Unary +, –, and * have higher precedence than the binary forms.
Summary of Contents for TMS320C54x
Page 38: ......
Page 39: ......
Page 40: ......
Page 41: ......
Page 42: ......
Page 43: ......
Page 44: ......
Page 45: ......
Page 46: ......
Page 47: ......
Page 48: ......
Page 49: ......
Page 50: ......
Page 51: ......
Page 52: ......
Page 53: ......
Page 54: ......
Page 55: ......
Page 56: ......
Page 57: ......
Page 58: ......
Page 59: ......
Page 60: ......
Page 61: ......
Page 62: ......
Page 276: ......
Page 277: ......
Page 278: ......
Page 279: ......
Page 280: ......
Page 281: ......
Page 282: ......
Page 283: ......
Page 284: ......
Page 285: ......
Page 286: ......
Page 287: ......
Page 288: ......
Page 289: ......
Page 290: ......
Page 291: ......
Page 292: ......
Page 293: ......
Page 294: ......
Page 295: ......
Page 296: ......
Page 297: ......
Page 298: ......
Page 299: ......
Page 300: ......
Page 301: ......
Page 302: ......