5.1.6.2 Attributes that Modify Section Types [DD]
Depending on the attribute, all or some section types may be modified by it, as below.
Attribute* | Description | Attribute applies to** |
---|---|---|
address(a) | locate at absolute address a | bss ,
code , data , heap ,
memory , persist ,
stack |
near | locate in the lowest range of memory | bss ,
data , persist |
xmemory | locate in X address space | bss ,
data , heap ,
persist |
ymemory | locate in Y address space | bss ,
data , heap ,
persist |
reverse(n) | align the ending address +1 | bss ,
data , memory ,
persist |
align(n) | align the starting address | bss ,
code , data , heap ,
memory , persist ,
stack |
noload | allocate, do not load | bss ,
code , data ,
memory , persist |
merge(n) | mergeable elements of size n*** | code ,
data |
info | do not allocate or load | bss ,
code , data |
shared | use section outside of application | bss ,
code , data ,
memory , stack |
preserved | preserve variables on restart | bss ,
data , memory ,
persist |
update | initialize variables on restart | bss ,
data , memory ,
persist |
priority(n) | group variable initializations together | bss ,
code , data |
* = Not all devices support
all attributes. If an attribute is not supported, it will be ignored. ** = See Attributes that Represent Section Types [DD] for descriptions and device support. *** = This attribute could be used by a linker to merge identical constants across input files. If n=0, the section contains null-terminated strings of variable length. |
Attributes that modify section types may be used in combination. For
example, xmemory,address(a)
is a valid attribute string, but
xmemory,address(a),ymemory
is not.
Attribute* | Attribute can be combined with* |
---|---|
address | near ,
xmemory , ymemory ,
noload |
near | address ,
xmemory , ymemory ,
reverse , align ,
noload , merge |
xmemory | address ,
near , reverse ,
align , noload ,
merge |
ymemory | address ,
near , reverse ,
align , noload ,
merge |
reverse | near ,
xmemory , ymemory ,
noload , merge |
align | near ,
xmemory , ymemory ,
noload , merge |
noload | address ,
near , xmemory ,
ymemory , reverse ,
align |
merge | near ,
xmemory , ymemory ,
reverse , align |
info | N/A |
shared | address ,
near , xmemory ,
ymemory , reverse ,
align , noload ,
merge , preserved ,
update , priority |
preserved | address ,
near , xmemory ,
ymemory , reverse ,
align , noload ,
merge , shared ,
priority |
update | address ,
near , xmemory ,
ymemory , reverse ,
align , noload ,
merge , shared ,
priority |
priority(n) | address ,
near , xmemory ,
ymemory , reverse ,
align , shared ,
preserved , update |
* = Not all devices support all attributes. If an attribute is not supported, it will be ignored. |