Use the REGISTER directive to assign one of the EPPC processor's non-volatile registers to a user-defined small data section.
REGISTER(nn [ , limit])
nn
Specifies one of the predefined small data base registers, a non-volative EPPC register, or any of the following values:
These registers are for the predefined small data sections:
0 - .PPC.EMB.sdata0/.PPC.EMB.sbss0
2 - .sdata2/sbss2
13 - .sdata/sbss
You do not have to define these sections using REGISTER because they are predefined.
Match any value in this range with the register reserved by your global register variable declaration.
This "register" value instructs the linker to treat relocations that refer to objects in your small data section as non-small data area relocations. These objects are converted to near absolute relocations, which means that the objects referenced must reside within the first 32 KB of memory. If they do not, the linker emits a "relocation out of range" error. To fix this problem, rewrite your code such that the offending objects use large data relocations.
limit
Specifies the maximum size of the small data section to which register nn is bound. This value is the size of the initialized and uninitialized sections of the small data section combined. If limit is not specified, 0x00008000 is used.