SLAU132Y September 2004 – June 2021
The compiler produces relocatable blocks of code and data. These blocks, called sections, are allocated in memory in a variety of ways to conform to a variety of system configurations. See Section 7.2.4 for a complete description of how the compiler uses these sections.
The compiler creates two basic kinds of sections: initialized and uninitialized. Table 5-1 summarizes the initialized sections. Table 5-2 summarizes the uninitialized sections.
Name | Contents |
---|---|
.binit | Boot time copy tables (See the MSP430 Assembly Language Tools User's Guide for information on BINIT in linker command files.) |
.mspabi.exidx | Index table for exception handling; read-only (see --exceptions option). |
.mspabi.extab | Unwinding instructions for exception handling; read-only (see --exceptions option). |
.data | Global and static non-const variables that are explicitly initialized. |
.init_array | Table of constructors to be called at startup. |
.name.load | Compressed image of section name; read-only (See the MSP430 Assembly Language Tools User's Guide for information on copy tables.) |
.ovly | Copy tables other than boot time (.binit) copy tables. Read-only data. |
.rodata | Global and static variables that have const qualifiers. |
.TI.crctab | Generated CRC checking tables. Read-only data. |
.TI.noinit | The pragma NOINIT causes a non-initailized variable to be placed in the .TI.noinit section. The default linker command file places this section with .bss. See Section 6.12.22 for details about the NOINIT and PERSISTENT pragmas. |
.TI.persistent | The pragma PERSISTENT causes an initialized variable to be placed in the .TI.persistent section. The default linker command file places this section with .data. |
Name | Contents |
---|---|
.args | Linker-created section used to pass arguments from the command line of the loader to the program |
.bss | Uninitialized global and static variables |
.cio | Buffers for stdio functions from the run-time support library |
.stack | Function call frame stack |
.sysmem | Memory pool (heap) for dynamic memory allocation (malloc, etc) |
When you link your program, you must specify where to allocate the sections in memory. In general, initialized sections are linked into ROM or RAM; uninitialized sections are linked into RAM.
The linker provides MEMORY and SECTIONS directives for allocating sections. For more information about allocating sections into memory, see the MSP430 Assembly Language Tools User's Guide.