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 aauxflash, bss, code, data, eedata, heap, memory, persist, psv, 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 +1auxflash, bss, data, eedata, memory, persist, psv
align(n)align the starting addressauxflash, bss, code, data, eedata, heap, memory, persist, psv, stack
noloadallocate, do not loadauxflash, bss, code, data, eedata, memory, persist, psv
merge(n)mergeable elements of size n***auxflash, code, data, eedata, psv
infodo not allocate or loadauxflash, bss, code, data
dmalocate in DMA spacebss, data, persist
bootlocate in boot segmentbss, code, eedata, psv
securelocate in secure segmentbss, code, eedata, psv
edslocate in extended data spacebss, data, persist
shareduse section outside of applicationauxflash, bss, code, data, eedata, memory, psv, stack
preservedpreserve variables on restartbss, data, memory, persist
updateinitialize variables on restartbss, data, memory, persist
priority(n)group variable initializations togetherauxflash, bss, code, data
pagedo not cross page boundaryauxflash, bss, code, data, persist, psv
* = Not all devices support all attributes. For dsPIC33A devices 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, dma, boot, secure, eds, page
nearaddress, xmemory, ymemory, reverse, align, noload, merge
xmemoryaddress, near, reverse, align, noload, merge, eds, page
ymemoryaddress, near, reverse, align, noload, merge, eds, page
reversenear, xmemory, ymemory, noload, merge, dma, boot, secure, eds, page
alignnear, xmemory, ymemory, noload, merge, dma, boot, secure, eds, page
noloadaddress, near, xmemory, ymemory, reverse, align, dma, boot, secure, eds, page
mergenear, xmemory, ymemory, reverse, align, eds, page
infoN/A
dmaaddress, reverse, align, noload, eds, page
bootaddress, reverse, align, noload, eds, page
secureaddress, reverse, align, noload, eds, page
edsaddress, xmemory, ymemory, reverse, align, noload, merge, dma, boot, secure, page
sharedaddress, near, xmemory, ymemory, reverse, align, noload, merge, dma, boot, secure, eds, preserved, update, priority, page
preservedaddress, near, xmemory, ymemory, reverse, align, noload, merge, dma, eds, shared, priority, page
updateaddress, near, xmemory, ymemory, reverse, align, noload, merge, dma, eds, shared, priority, page
priority(n)address, near, xmemory, ymemory, reverse, align, dma, boot, secure, eds, shared, preserved, update, page
pageaddress, xmemory, ymemory, reverse, align, noload, merge, dma, boot, secure, eds
* = Not all devices support all attributes. For dsPIC33A devices if an attribute is not supported, it will be ignored.