Creating and Filling Holes
7-61
Linker Description
7.15 Creating and Filling Holes
The linker provides you with the ability to create areas
within output sections
that have nothing linked into them. These areas are called holes. In special
cases, uninitialized sections can also be treated as holes. The following text
describes how the linker handles such holes and how you can fill holes (and
uninitialized sections) with a value.
7.15.1 Initialized and Uninitialized Sections
An output section contains
one of the following:
-
Raw data for the
entire section
-
No raw data
A section that has raw data is referred to as
initialized. This means that the
object file contains the actual memory image contents of the section. When the
section is loaded, this image is loaded into memory at the section’s specified
starting address. The .text and .data sections
always have raw data if anything
was assembled into them. Named sections defined with the .sect assembler
directive also have raw data.
By default, the .bss section and sections defined with the .usect directive have
no raw data (they are
uninitialized). They occupy space in the memory map
but have no actual contents. Uninitialized sections typically reserve space in
RAM for variables. In the object file, an uninitialized section has a normal sec-
tion header and may have symbols defined in it; however, no memory image
is stored in the section.
7.15.2 Creating Holes
You can create a hole in an initialized output section. A hole is created when
you force the linker to leave extra space between input sections within an out-
put section. When such a hole is created,
the linker must follow the first guide-
line above and supply raw data for the hole.
Holes can be created only
within output sections. Space can exist between
output sections, but such space is not holes. There is no way to fill or initialize
the space between output sections with the SECTIONS directive.
To create a hole in an output section, you must use a special type of linker
assignment statement within an output section definition. The assignment
statement modifies the SPC (denoted by “.”) by adding to it, assigning a greater
value to it, or aligning it on an address boundary. The operators, expressions,
and syntaxes of assignment statements are described in Section 7.14,
Assigning Symbols at Link Time, on page 7-57.
Содержание 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: ......