Create a Relocatable Label
.label
4-59
Assembler Directives
Syntax
.label
symbol
Description
The .label directive defines a special
symbol that refers to the loadtime ad-
dress rather than the runtime address within the current section. Most sections
created by the assembler have relocatable addresses. The assembler as-
sembles each section as if it started at 0, and the linker relocates it to the ad-
dress at which it loads and runs.
For some applications, it is desirable to have a section load at one address and
run at a
different address. For example, you may wish to load a block of perfor-
mance-critical code into slower off-chip memory to save space, and then move
the code to high-speed on-chip memory to run it.
Such a section is assigned two addresses at link time: a load address and a
run address. All labels defined in the section are relocated to refer to the run-
time address so that references to the section (such as branches) are correct
when the code runs.
The .label directive creates a special
label that refers to the loadtime address.
This function is useful primarily to designate where the section was loaded for
purposes of the code that relocates the section.
Example
This example shows the use of a loadtime address label.
.sect ”.EXAMP”
.label EXAMP_LOAD ; load address of section.
START: ; run address of section.
<code>
FINISH: ; run address of section end.
.label EXAMP_END ; load address of section end.
For more information about assigning runtime and loadtime addresses in the
linker, see Section 7.9,
Specifying a Section’s Runtime Address, on page 7-41.
Содержание TMS320C54x
Страница 38: ......
Страница 39: ......
Страница 40: ......
Страница 41: ......
Страница 42: ......
Страница 43: ......
Страница 44: ......
Страница 45: ......
Страница 46: ......
Страница 47: ......
Страница 48: ......
Страница 49: ......
Страница 50: ......
Страница 51: ......
Страница 52: ......
Страница 53: ......
Страница 54: ......
Страница 55: ......
Страница 56: ......
Страница 57: ......
Страница 58: ......
Страница 59: ......
Страница 60: ......
Страница 61: ......
Страница 62: ......
Страница 276: ......
Страница 277: ......
Страница 278: ......
Страница 279: ......
Страница 280: ......
Страница 281: ......
Страница 282: ......
Страница 283: ......
Страница 284: ......
Страница 285: ......
Страница 286: ......
Страница 287: ......
Страница 288: ......
Страница 289: ......
Страница 290: ......
Страница 291: ......
Страница 292: ......
Страница 293: ......
Страница 294: ......
Страница 295: ......
Страница 296: ......
Страница 297: ......
Страница 298: ......
Страница 299: ......
Страница 300: ......
Страница 301: ......
Страница 302: ......