Microchip Technology SW006023-2N データシート
![Microchip Technology](https://files.manualsbrain.com/attachments/cf42c3c895ef469f06d2e47e97fd98d738fcf5cf/common/fit/150/50/7340124dc8aa983aaf764094e2f06faab86f306c03111c5817f7e4e53fb2/brand_logo.gif)
MPLAB
®
XC32 C/C++ Compiler User’s Guide
DS51686E-page 106
2012 Microchip Technology Inc.
Finally, note that “small” data and bss (.sdata, .sbss, etc.) sections are still mapped
in the built-in default linker script. This is because “small” data variables must be
grouped together so that they are within range of the more efficient GP-relative
addressing mode. To avoid conflict with these linker-script mapped sections, choose
high addresses for your absolute-address variables.
in the built-in default linker script. This is because “small” data variables must be
grouped together so that they are within range of the more efficient GP-relative
addressing mode. To avoid conflict with these linker-script mapped sections, choose
high addresses for your absolute-address variables.
aligned (n)
The attributed variable will be aligned on the next n byte boundary.
The aligned attribute can also be used on a structure member. Such a member will
be aligned to the indicated boundary within the structure.
be aligned to the indicated boundary within the structure.
If the alignment value n is omitted, the alignment of the variable is set 8 (the largest
alignment value for a basic data type).
alignment value for a basic data type).
Note that the aligned attribute is used to increase the alignment of a variable, not
reduce it. To decrease the alignment value of a variable, use the packed attribute.
reduce it. To decrease the alignment value of a variable, use the packed attribute.
cleanup (function)
Indicate a function to call when the attributed automatic function scope variable goes
out of scope.
out of scope.
The indicated function should take a single parameter, a pointer to a type compatible
with the attributed variable, and have void return type.
with the attributed variable, and have void return type.
deprecated
deprecated (msg)
When a variable specified as deprecated is used, a warning is generated. The
optional msg argument, which must be a string, will be printed in the warning, if present.
optional msg argument, which must be a string, will be printed in the warning, if present.
packed
The attributed variable or structure member will have the smallest possible alignment.
That is, no alignment padding storage will be allocated for the declaration. Used in
combination with the aligned attribute, packed can be used to set an arbitrary
alignment restriction greater or lesser than the default alignment for the type of the
variable or structure member.
That is, no alignment padding storage will be allocated for the declaration. Used in
combination with the aligned attribute, packed can be used to set an arbitrary
alignment restriction greater or lesser than the default alignment for the type of the
variable or structure member.
section (“section-name”)
Place the variable into the named section.
For example,
unsigned int dan __attribute__ ((section (“.quixote”)))
Variable dan will be placed in section .quixote.
The -fdata-sections command line option has no effect on variables defined with
a section attribute unless unique_section is also specified.
a section attribute unless unique_section is also specified.
Note:
In almost all cases, you will want to combine the address attribute with the
space attribute to indicate code or data.
space attribute to indicate code or data.