To build a SDA PIC/PID application, select SDA PIC/PID in the ABI list box in the CodeWarrior IDE's EPPC Target target preferences Properties > C/C++ Build > Settings > Tool Settings > PowerPC CPU panel. The compiler defines a simple variable that we can use to guard PIC/PID source.
#if __option(sda_pic_pid) // is true if we have chosen SDA PIC/PID ABI
At link-time, the linker generates a table used for the runtime files __ppc_eabi_init.cpp and __ppc_eabi_init.c .
If our application contains absolute addressing relocations, we will receive linker warnings telling us that those relocations may cause a problem. To resolve these warnings, either:
For SDA PIC/PID, this option changes absolute-addressed references of data from code to use a small data register instead of r0 and changes absolute code-to-code references to use the PC-relative relocations.