The SECTIONS Directive
7-38
7.8.3.3
Alignment and blocking
You can tell the linker to place an output section at an address that falls on an
n-word boundary, where n is a power of 2. For example:
.text: load = align(128)
allocates .text so that it falls on a 128-word boundary.
Blocking is a weaker form of alignment that allocates a section anywhere
within a block of size n. If the section is larger than the block size, the section
will begin on that boundary. As with alignment, n must be a power of 2. For
example:
bss: load = block(0x80)
allocates .bss so that the section either is contained in a single 128-word page
or begins on a page.
You can use alignment or blocking alone or in conjunction with a memory area,
but alignment and blocking cannot be used together.
7.8.3.4
Specifying input sections
An input section specification identifies the sections from input files that are
combined to form an output section. The linker combines input sections by
concatenating them in the order in which they are specified. The size of an
output section is the sum of the sizes of the input sections that comprise it.
Example 7–5 shows the most common type of section specification; note that
no
input sections are listed.
Example 7–5. The Most Common Method of Specifying Section Contents
SECTIONS
{
.text:
.data:
.bss:
}
In Example 7–5 the linker takes all the .text sections from the input files and
combines them into the .text output section. The linker concatenates the .text
input sections in the order that it encounters them in the input files. The linker
performs similar operations with the .data and .bss sections. You can use this
type of specification for
any output section.
Содержание 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: ......