How the Assembler Handles Sections
2-8
2.3.4
Subsections
Subsections are smaller sections within larger sections. Like sections,
subsections can be manipulated by the linker. Subsections give you tighter
control of the memory map. You can create subsections by using the .sect or
.usect directive. The syntax for a subsection name is:
section name:subsection name
A subsection is identified by the base section name followed by a colon, then
the name of the subsection. A subsection can be allocated separately or
grouped with other sections using the same base name. For example, to
create a subsection called _func within the .text section, enter the following:
.sect ”.text:_func”
You can allocate _func separately or within all the .text sections.
You can create two types of subsections:
-
Initialized subsections are created using the .sect directive. See
subsection 2.3.2,
Initialized Sections, on page 2-6.
-
Uninitialized subsections are created using the .usect directive. See
subsection 2.3.1,
Uninitialized Sections, on page 2-4.
Subsections are allocated in the same manner as sections. See Section 7.8,
The SECTIONS Directive, on page 7-32 for more information.
2.3.5
Section Program Counters
The assembler maintains a separate program counter for each section. These
program counters are known as
section program counters, or SPCs.
An SPC represents the current address within a section of code or data.
Initially, the assembler sets each SPC to 0. As the assembler fills a section with
code or data, it increments the appropriate SPC. If you resume assembling into
a section, the assembler remembers the appropriate SPC’s previous value
and continues incrementing the SPC at that point.
The assembler treats each section as if it began at address 0; the linker
relocates each section according to its final location in the memory map. For
more information, see Section 2.5,
Relocation, on page 2-15.
Содержание 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: ......