Default Allocation Algorithm
7-53
Linker Description
7.12 Default Allocation Algorithm
The MEMORY and SECTIONS directives provide flexible methods for
building, combining, and allocating sections. However, any memory locations
or sections that you choose
not to specify must still be handled by the linker.
The linker uses default algorithms to build and allocate sections within the
specifications you supply. Subsections 7.12.1,
Allocation Algorithm, and
7.12.2,
General Rules for Output Sections, describe default allocation.
7.12.1 Allocation Algorithm
If you do not use the MEMORY and SECTIONS directives, the linker allocates
output sections as though the following definitions are specified.
Example 7–12. Default Allocation for TMS320C54x Devices
MEMORY
{
PAGE 0: PROG: origin = 0x0080
length = 0xFF00
PAGE 1: DATA: origin = 0x0080
length = 0xFF80
}
SECTIONS
{
.text:
PAGE = 0
.data:
PAGE = 0
.cinit:
PAGE = 0 ;cflag option only
.bss:
PAGE = 1
}
All .text input sections are concatenated to form a .text output section in the
executable output file, and all .data input sections are combined to form a .data
output section. The .text and .data sections are allocated into configured
memory on PAGE 0, which is the program memory space. All .bss sections are
combined to form a .bss output section. The .bss section is allocated into
configured memory on PAGE 1, which is the data memory space.
If the input files contain initialized named sections, the linker allocates them
into program memory following the .data section. If the input files contain
uninitialized named sections, the linker allocates them into data memory fol-
lowing the .bss section. You can override this by specifying an explicit PAGE
in the SECTIONS directive.
If you use a SECTIONS directive, the linker performs
no part of the default
allocation. Allocation is performed according to the rules specified by the
SECTIONS directive and the general algorithm described in subsection
7.12.2,
General Rules for Output Sections.
Содержание 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: ......