VMS Help  —  MACRO  /MIGRATION  MACRO Compiler Directives, .LINKAGE PSECT, 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
    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.
Close Help