User`s guide

MACRO Compiler Directives
.LINKAGE_PSECT (OpenVMS Alpha only)
.LINKAGE_PSECT (OpenVMS Alpha only)
Allows the name of the linkage section psect to be changed.
Format
.LINKAGE_PSECT program-section-name
Parameters
program_section_name
Name of the program section. The name can contain up to 31 characters,
including any alphanumeric character and the special characters underline (_),
dollar sign ($), and period (.).
Description
The .LINKAGE_PSECT directive allows you to locate a routine’s linkage section
by reference to other psects within the routine. This facilitates such operations
as locking code within memory (see Section 3.10) and forcing code location. An
example of forcing code location is to explicitly place the psect in the image
created by the linker, using linker options. This would let you use adjacent psects
to find their bounds.
You can use the .LINKAGE_PSECT directive multiple times within a single
source module to set different linkage sections for different routines. However,
note that a routine’s linkage section remains the same for the entire routine.
The name of the routine’s linkage section is the one specified in the last
.LINKAGE_PSECT directive before the routine’s entry point directive.
The compiler reports a fatal error if different linkage sections are specified for
routines that share code paths.
The .LINKAGE_PSECT directive sets the psect attributes to be the same as the
default linkage psect $LINKAGE. The attributes are the same as the normal
psect default attributes except the linkage psect is set NOEXE NOWRT.
You can change the linkage section psect attributes using the .PSECT directive
after declaring the psect with .LINKAGE_PSECT.
Example
.LINKAGE_PSECT LINK_001
.PSECT LINK_000
LS_START:
.PSECT LINK_002
LS_END:
This code allows a program to use LS_START and LS_END in computations to
determine the location and size of the linkage section (LINK_001) of the routine.
B–16 Specialized Directives