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 |
tls | Mark data as being thread local storage | bss, data,
group |
group | Group similarly-named sections together for allocation even across object files | bss, code,
data, persist,
near, xmemory,
ymemory, align,
reverse, keep,
preserved, update,
priority, tls,
ramfunc |
| * = Not all devices support
all attributes. If an attribute is not supported, it will be ignored. ** = See 5.1.6.1 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. | |
