Position-independent is achieved by referencing the constant data in PC-relative mode in the CC-RH. Since this is the same relative reference method as that for code, the PIROD facility has to be enabled simultaneously with the PIC facility. Then, the constant data has to be appropriately allocated to a desirable position for execution so that the distance between the code area and constant data area is the same as that at linkage.
When the -pirod option is specified, the default section to which the constant data is allocated will be the .pcconst32 section. Allocation and reference to a given position is enabled by referencing the constant data that was allocated to the .pcconst32 section in PC-relative mode. The allocation section can be changed to the .pcconst16 section or .pcconst23 section by using the #pragma section directive or -Xsection option.