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.

Table 5-2. Attributes That Modify Section Types
Attribute*DescriptionAttribute applies to**
address(a)locate at absolute address abss, code, data, heap, memory, persist, stack
nearlocate in the lowest range of memorybss, data, persist
xmemorylocate in X address spacebss, data, heap, persist
ymemorylocate in Y address spacebss, data, heap, persist
reverse(n)align the ending address +1bss, data, memory, persist
align(n)align the starting addressbss, code, data, heap, memory, persist, stack
noloadallocate, do not loadbss, code, data, memory, persist
merge(n)mergeable elements of size n***code, data
infodo not allocate or loadbss, code, data
shareduse section outside of applicationbss, code, data, memory, stack
preservedpreserve variables on restartbss, data, memory, persist
updateinitialize variables on restartbss, data, memory, persist
priority(n)group variable initializations togetherbss, 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.

Table 5-3. Combining Attributes that Modify Section Types
Attribute*Attribute can be combined with*
addressnear, xmemory, ymemory, noload
nearaddress, xmemory, ymemory, reverse, align, noload, merge
xmemoryaddress, near, reverse, align, noload, merge
ymemoryaddress, near, reverse, align, noload, merge
reversenear, xmemory, ymemory, noload, merge
alignnear, xmemory, ymemory, noload, merge
noloadaddress, near, xmemory, ymemory, reverse, align
mergenear, xmemory, ymemory, reverse, align
infoN/A
sharedaddress, near, xmemory, ymemory, reverse, align, noload, merge, preserved, update, priority
preservedaddress, near, xmemory, ymemory, reverse, align, noload, merge, shared, priority
updateaddress, 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.