Special Section Types (DSECT, COPY, and NOLOAD)
7-56
7.13 Special Section Types (DSECT, COPY, and NOLOAD)
You can assign three special type designations to output sections: DSECT,
COPY, and NOLOAD. These types affect the way that the program is treated
when it is linked and loaded. You can assign a type to a section by placing the
type (enclosed in parentheses) after the section definition. For example:
SECTIONS
{
sec1 2000h (DSECT) : {f1.obj}
sec2 4000h (COPY) : {f2.obj}
sec3 6000h (NOLOAD) : {f3.obj}
}
-
The DSECT type creates a dummy section with the following qualities:
J
It is not included in the output section memory allocation. It takes up no
memory and is not included in the memory map listing.
J
It can overlay other output sections, other DSECTs, and unconfigured
memory.
J
Global symbols defined in a dummy section are relocated normally.
They appear in the output module’s symbol table with the same value
they would have if the DSECT had actually been loaded. These sym-
bols can be referenced by other input sections.
J
Undefined external symbols found in a DSECT cause specified
archive libraries to be searched.
J
The section’s contents, relocation information, and line number
information are not placed in the output module.
In the preceding example, none of the sections from f1.obj are allocated,
but all of the symbols are relocated as though the sections were linked at
word address 2000h. The other sections can refer to any of the global
symbols in sec1.
-
A COPY section is similar to a DSECT section, except that its contents and
associated information are written to the output module. The .cinit section
that contains initialization tables for the TMS320C54x C compiler has this
attribute under the RAM model.
-
A NOLOAD section differs from a normal output section in one respect: the
section’s contents, relocation information, and line number information
are not placed in the output module. The linker allocates space for it, and
it appears in the memory map listing.
Содержание 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: ......