You must establish symbolic linkage between source modules so that
you can refer to or branch to symbolic locations defined in the control
sections of external source modules. You do this by using external
symbol definitions, and external symbol references. To establish
symbolic linkage with an external source module, you must do the following:
- In the current source module, you must identify the symbols that
are not defined in that source module, if you want to use them in
instruction operands. These symbols are called external symbols,
because they are defined in another (external) source module. You
identify external symbols in the EXTRN or WXTRN instruction, or the
V-type address constant. For more information about the EXTRN and
WXTRN instructions, see EXTRN instruction and WXTRN instruction.
- In the external source modules, you must identify the symbols
that are defined in those source modules, and that you refer to from
the current source module. The two types of definitions that you
can use are control section names (defined by the CSECT, RSECT, and
START instructions), and entry symbols. Entry symbols are so called
because they provide points of entry to a control section in a source
module. You identify entry symbols with the ENTRY instruction. For
more information about the ENTRY instruction, see ENTRY instruction.
- Your reference external symbols using one of these methods:
- Provide the A-type or V-type address constants needed by the assembler
to reserve storage for the addresses represented by the external symbols.
- Reference an external symbol in the same class in a relative branch
instruction.
The assembler places information about entry and external symbols
in the external symbol dictionary. The linker uses this information
to resolve the linkage addresses identified by the entry and external
symbols.