SPRUI04F july 2015 – april 2023
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 8.1.1 for a complete description of how the compiler uses these sections.
The compiler creates two basic kinds of sections: initialized and uninitialized. Table 6-1 summarizes the initialized sections. Table 6-2 summarizes the uninitialized sections.
Name | Contents |
---|---|
.args | Reserved space for copying command line arguments before the main() function is called by the boot routine. See Section 3.6. |
.binit | Boot time copy tables (See the TMS320C6000 Assembly Language Tools User's Guide for information on BINIT in linker command files.) |
.c6xabi.exidx | Index table for exception handling; read-only (see --exceptions option). |
.c6xabi.extab | Unwinding instructions for exception handling; read-only (see --exceptions option). |
.cinit | The compiler does not generate a .cinit section unless the --rom_mode linker option is specified. If --rom_mode is specified, the linker creates this section, which contains tables for explicitly initialized global and static variables. |
.const | Global and static const variables, including string constants and initializers for local variables. |
.data | Global and static non-const variables that are explicitly initialized. |
.fardata | Far non-const global and static 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 TMS320C6000 Assembly Language Tools User's Guide for information on copy tables.) |
.neardata | Near non-const global and static variables that are explicitly initialized. |
.ovly | Copy tables other than boot time (.binit) copy tables. Read-only data. |
.ppdata | Data tables for compiler-based profiling (see the --gen_profile_info option). |
.ppinfo | Correlation tables for compiler-based profiling ( see the --gen_profile_info option). |
.rodata | Global and static variables that have near and const qualifiers. |
.switch | Jump tables for large switch statements. |
.text | Standard default section for executable code. The --gen_func_subsections option causes code to be placed in separate .text:func section for each function, func(). |
.TI.crctab | Generated CRC checking tables. Read-only data. |
Name | Contents |
---|---|
.bss | Uninitialized global and static variables |
.cio | Buffers for stdio functions from the run-time support library |
.far | Global and static variables declared far |
.stack | 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. With the exception of code sections, the initialized and uninitialized sections created by the compiler cannot be allocated into internal program memory.
The linker provides MEMORY and SECTIONS directives for allocating sections. For more information about allocating sections into memory, see the TMS320C6000 Assembly Language Tools User's Guide.