Constructed reentrancy

A constructed reentrant program is created by using either of the following methods:
  • Use the binder to combine all of the object modules produced by the z/OS® XL C/C++ compiler when the target data set is a PDSE or HFS.
  • Use the prelinker to combine all of the object modules produced by the z/OS XL C/C++ compiler and pass the output to the binder when the target data set is a PDS. For more information about the prelinker see Prelinking an application.

The compile-time initialization information from one or more object modules is combined into a single initialization unit.

Programs with constructed reentrancy are split into two parts:
  • A variable or nonreentrant part that contains external data
  • A constant or reentrant part that contains executable code and constant data

Each user running the program receives a private copy of the first part (mapped by either the binder or the prelinker), which is initialized at run time. The second part can be shared across multiple spaces or sessions only if it is installed in the link pack area (LPA) or extended link pack area (ELPA).