How the Assembler Handles Sections
2.3
How the Assembler Handles Sections
2.3.1
Uninitialized Sections
2-4
The assembler identifies the portions of an assembly language program that
belong in a section. The assembler has five directives that support this
function:
-
.bss
-
.usect
-
.text
-
.data
-
.sect
The .bss and .usect directives create uninitialized sections ; the .text, .data,
and .sect directives create initialized sections .
You can create subsections of any section to give you tighter control of the
memory map. Subsections are created using the .sect and .usect directives.
Subsections are identified with the base section name and a subsection name
separated by a colon. See subsection 2.3.4, Subsections , page 2-8, for more
information.
Note: Default Section Directive
If you don't use any of the sections directives, the assembler assembles
everything into the .text section.
Uninitialized sections reserve space in processor memory; they are usually
allocated into RAM. These sections have no actual contents in the object file;
they simply reserve memory. A program can use this space at runtime for
creating and storing variables.
Uninitialized data areas are built by using the .bss and .usect assembler
directives.
-
The .bss directive reserves space in the .bss section.
-
The .usect directive reserves space in a specific, uninitialized named
section.
Each time you invoke the .bss directive, the assembler reserves more space
in the appropriate section. Each time you invoke the .usect directive, the
assembler reserves more space in the specified named section.
Need help?
Do you have a question about the TMS320C54x and is the answer not in the manual?