If you have C code compiled with the NORENT option (hereafter
called NORENT code) you must determine the base address
of the static storage area if you want to calculate the address of
a static or external variable.
Perform the following steps to find the static storage area:
- Name the static storage area CSECT by using the pragma
csect directive. Once this is done, a CSECT is generated
for the static storage area for each source file.
- Determine the origin and length of the CSECT from the linker map.
- Locate the external variables corresponding to the CSECT with
the same name.
- Determine the origin and length of the external variable CSECT
from the linker map.
Note: - Address calculation for static and external variables uses the
static storage area as a base address with 1 or more offsets added
to this address.
- The storage associated with these CSECTs is not dumped when an
exception occurs. It is dumped when cdump or CEE3DMP
is called, but it is written to a separate ddname called CEESNAP.
For information about cdump, CEE3DMP, and enabling
the CEESNAP ddname, see Generating a Language Environment dump of a C/C++ routine.