Reserve Space in the .bss Section
Syntax
.bss
symbol,size in words[,
blocking flag[,
alignment] ]
Description
The .bss directive reserves space
for variables in the .bss section. This directive is usually used to allocate space in
RAM.
This directive is similar to
the .usect directive (see .usect topic); both simply reserve space for data and that space has no
contents. However, .usect defines additional sections that can be placed anywhere in
memory, independently of the .bss section.
Note: This directive is supported only in
EABI mode.
- The symbol is a required
parameter. It defines a symbol that points to the first location reserved by the
directive. The symbol name must correspond to the variable that you are reserving
space for.
- The size in words is a required parameter; it must
be an absolute constant expression. The assembler allocates size words in the .bss section. There is no default
size.
- The
blocking flag is an optional parameter. If you specify a value greater than
0 for this parameter, the assembler allocates size in words contiguously. This means
that the allocated space does not cross a page boundary unless its size is greater
than a page, in which case the object starts on a page boundary.
- The alignment is an optional
parameter
that ensures that the space allocated to the symbol
occurs on the specified boundary. The boundary must be set to a power of 2 between
20 and 215, inclusive. If the SPC is already aligned at
the specified boundary, it is not incremented.
For more information about
sections, see Chapter 3.