SPNU151W January 1998 – March 2023 66AK2E05 , 66AK2H06 , 66AK2H12 , 66AK2H14 , AM1705 , AM1707 , AM1802 , AM1806 , AM1808 , AM1810 , AM5K2E04 , C346BA02 , C348A01 , CS241C01-Q1 , CS241C05-Q1 , CS246C01-Q1 , CS348C02-Q1 , OMAP-L132 , OMAP-L137 , OMAP-L138 , S470AV336LYSQRB , TMS470R1A288 , TMS470R1A384 , TMS470R1A64 , TMS470R1B1M , TMS470R1B512 , TMS470R1B768
The compiler produces relocatable blocks of code and data called sections, which are allocated in memory in a variety of ways to conform to a various system configurations. For information about sections and allocating them, see the introductory object file information in the ARM Assembly Language Tools User's Guide.
There are two basic types of sections:
The assembler creates the default sections .text, .bss, and .data. You can instruct the compiler to create additional sections by using the CODE_SECTION and DATA_SECTION pragmas (see Section 5.11.4 and Section 5.11.7).
The linker takes the individual sections from different object files and combines sections that have the same name. The resulting output sections and the appropriate placement in memory for each section are listed in Table 6-1. You can place these output sections anywhere in the address space as needed to meet system requirements.
Section | Type of Memory | Section | Type of Memory |
---|---|---|---|
.bss | RAM | .pinit | ROM or RAM |
.cinit | ROM or RAM | .stack | RAM |
.const | ROM or RAM | .sysmem | RAM |
.data | RAM | .text | ROM or RAM |
.init_array | ROM or RAM |
You can use the SECTIONS directive in the linker command file to customize the section-allocation process. For more information about allocating sections into memory, see the linker description chapter in the ARM Assembly Language Tools User's Guide.