
How the Assembler Handles Sections
2-6
2.3.2
Initialized Sections
Initialized sections contain executable code or initialized data. The contents
of these sections are stored in the object file and placed in processor memory
when the program is loaded. Each initialized section is independently relocat-
able and may reference symbols that are defined in other sections. The linker
automatically resolves these section-relative references.
Three directives tell the assembler to place code or data into a section. The
syntaxes for these directives are:
.text [
value]
.data [
value]
.sect ”
section name” [, value]
When the assembler encounters one of these directives, it stops assembling
into the current section (acting as an implied end-current-section command).
It then assembles subsequent code into the designated section until it encoun-
ters another .text, .data, or .sect directive. The
value, if present, specifies the
starting value of the section program counter. The starting value of the section
program counter can be specified only once; it must be done the first time the
directive for that section is encountered. By default, the SPC starts at 0.
Sections are built through an iterative process. For example, when the assem-
bler first
encounters a .data directive, the .data section is empty. The state-
ments following this first .data directive are assembled into the .data section
(until the assembler encounters a .text or .sect directive). If the assembler
encounters subsequent .data directives, it adds the statements following
these .data directives to the statements already in the .data section. This
creates a single .data section that can be allocated contiguously into memory.
Initialized subsections are created with the .sect directive. The assembler
treats initialized subsections in the same manner as initialized sections. See
subsection 2.3.4,
Subsections, on page 2-8 for more information on creating
subsections.
Содержание 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: ......