gtpa2m4bApplication Programming

Rearrange TXT (REATXT) Tool: Sample Code Only

For link map support, the REATXT tool (sample code only) performs the extra processing needed when the C source file has been compiled with the NORENT option and the VM linkage editor (LKED) is used. The code and static data CSECTs for each object file are out of order, making it difficult to find the code that matches up with a compiled listing. The REATXT tool rearranges the CSECTs to match the order produced by the MVS linkage editor between the prelink and link-edit steps.

Note:
If you do all the compiles with the RENT option and use the VM linkage editor (VM LKED), you do not need to use the REATXT tool.

Table 29 shows you the difference between compiling with the NORENT option while using the MVS linkage editor versus using the VM linkage editor (VM LKED).

Table 29. MVS and VM Linkage Editor Comparison

MVS VM LKED + NORENT
CSTRTD CSTRTD
Address of object file 1
Code CSECT for object file 1
Static CSECTs for object file 1
Address of object file 1
Static CSECTs for object file 1
Code CSECT for object file 1
Address of object file 2
Code CSECT for object file 2
Static CSECTs for object file 2
Address of object file 2
Static CSECTs for object file 2
Code CSECT for object file 2
ESDs are placed in ascending numeric order. ESDs are placed in ascending numeric order.
TXTs are in the same ascending numeric order as ESDs. TXTs are left in the same order from the compile.

Because the length of these static variable CSECTs is not a fixed length, it is helpful to rearrange the CSECTs to match the order produced by the MVS linkage editor between the prelink and link-edit steps.

See the prolog of the REATXT source code for more information about using the REATXT tool.