To use an external dummy section, you must do the following:
- Identify and define the external dummy section. The assembler
computes the length and alignment required. The linker merges this
definition with other definitions of the same name, assigning the
longest length and strictest alignment.
- Provide a Q-type constant for each external dummy section defined.
- Use the CXD instruction to reserve a fullword area into which
the linker or loader inserts the total length of all the external
dummy sections that are specified in the source modules of your program.
The linker computes this length from the accumulated lengths of the
individual external dummy sections supplied by the assembler.
- Allocate a storage area using this computed total length.
- Load the address of the allocated area into a register.
- Add to the address in the register the offset into the allocated
area of the applicable external dummy section. The linker inserts
this offset into the area reserved by the associated Q-type address
constant.
- Establish the addressability of the external dummy section in
combination with the portion of the allocated area reserved for the
external dummy section.
You can now refer symbolically to the locations in the external
dummy section. The source statements in an external dummy section
are not assembled into object code. Thus, you must create the data
described by external dummy sections at execution time.
Note: During linking, external dummy sections
might be arranged in any order. Do not assume any ordering relationship
among external dummy sections.