VMS Help
LINK

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

    Invokes the OpenVMS Linker utility to link one or more
    input files into a program image and defines the execution
    characteristics of the image. For a complete description of the
    linker, including more information about the LINK command, see
    the OpenVMS Linker Utility Manual.

    Format

      LINK  file-spec [,...]

  1 - Parameters

 file-spec

    Specifies one or more input files (wildcard characters are not
    allowed). Input files can be object modules, shareable images,
    libraries to be searched for external references or from which
    specific modules are to be included, or options files to be read
    by the linker. Separate multiple input file specifications with
    commas (,)  or plus signs (+). In either case, the linker creates
    a single image file.

    If you omit the file type in an input file specification, the
    linker supplies default file types, based on the nature of the
    input file. For object modules, the default file type is .OBJ.

  2 - Qualifiers

 2.1 - /ALPHA

    Directs the linker to produce an OpenVMS Alpha image. The default
    action, when neither /ALPHA nor /VAX is specified, is to create
    an OpenVMS VAX image on an OpenVMS VAX system and to create an
    OpenVMS Alpha image on an OpenVMS Alpha system.

 2.2 - /BPAGE

       /BPAGE[=page-size-indicator]

    Specifies the page size the linker should use when it creates the
    image sections that make up an image.

    The page-size-indicatior specifies a page size as the power of 2
    required to create a page that size. For example, to get an 8KB
    page size, specify the value 13 because 2**13 equals 8K. The
    following table lists the page sizes supported by the linker with
    the defaults:

            Page
    Value   Size      Defaults

    9       512       Default value for VAX links when the /BPAGE
            bytes     qualifier is not specified.
    13      8 KB      Default value for VAX links when the /BPAGE
                      qualifier is specified without a value.
    14      16 KB     -
    15      32 KB     -
    16      64 KB     Default value for Alpha links when /BPAGE is
                      not specified or when the /BPAGE qualifier is
                      specified without a value.

 2.3 - /BRIEF

       /MAP/BRIEF

    Directs the linker to produce a brief image map. For more
    information, see also the /MAP and /FULL qualifiers.

 2.4 - /CONTIGUOUS

       /CONTIGUOUS
       /NOCONTIGUOUS (default)

    Directs the linker to place the entire image in consecutive disk
    blocks. If sufficient contiguous space is not available on the
    output disk, the linker reports an error and terminates the link
    operation.

 2.5 - /CROSS_REFERENCE

       /MAP/CROSS_REFERENCE
       /MAP/NOCROSS_REFERENCE (default)

    Directs the linker to replace the Symbols By Name section in
    a full or default image map with the Symbol Cross-Reference
    section.

 2.6 - /DEBUG

       /DEBUG[=file-spec]
       /NODEBUG (default)

    Directs the linker to generate a debugger symbol table (DST)
    using DBG and TBT object language records and to give the
    debugger control when the image is run.

    If you specify the /DEBUG qualifier without entering a file
    specification, the OpenVMS Debugger gains control at run time.
    Requesting the OpenVMS Debugger does not affect the location of
    code within the image because the debugger is mapped into the
    process address space at run time, not at link time. See the
    OpenVMS Debugger Manual for additional information.

    If you specify the /DEBUG qualifier with a file specification,
    the user-written debugger module that the file specification
    identifies gains control at run time. The linker assumes a
    default file type of .OBJ. Requesting a user-written debugger
    module does affect the location of code within the image because
    the linker together with program code processes the debugger
    module code.

 2.7 - /DEMAND_ZERO

       /DEMAND_ZERO (default)
       /DEMAND_ZERO[=per_page]
       /NODEMAND_ZERO

    For Alpha linking, enables demand-zero image section production
    for both executable and shareable images.

    Per-page enables the linker to perform demand-zero compression
    on Alpha images on a per-page basis. If this keyword is not used,
    the linker performs demand-zero compression on an image-section
    basis only.

 2.8 - /DSF

       /DSF[=file-spec]
       /NODSF (default)

    For Alpha linking, directs the linker to create a file called a
    debug symbol file (DSF) for use by the OpenVMS Debugger or the
    OpenVMS Alpha System-Code Debugger.

    The file-spec specifies the character string you want the linker
    to use as the name of the debug symbol file.  If you do not include
    a file type in the character string, the linker appends the .DSF
    file type to the file name.

    If you specify the /DSF qualifier without the file specification,
    the linker creates a debug symbol file with the file name of the
    first input file and the default file type .DSF.  If you append the
    /DSF qualifier to one of the input file specifications, the linker
    creates a debug symbol file with the file name of the file to which
    the qualifier is appended and with the default file type .DSF.

    The OpenVMS Debugger (whether you use it in System-Code Debugger
    mode or user mode) requires that the name of the DSF file be the
    same as the name of the image file, except that the file extension
    is .DSF.  If you use an /EXECUTABLE or /SHAREABLE qualifier and a
    file name with the LINK command, you must also include the same file
    name with the /DSF qualifier. (You must use the .DSF file type.)

 2.9 - /EXECUTABLE

       /EXECUTABLE[=file-spec] (default)
       /NOEXECUTABLE

    Directs the linker to create an executable image, as opposed to a
    shareable image or a system image.

    The file-spec specifies the character string you want the linker to
    use as the name of the image file that the link operation produces.
    If you do not specify a file type in the character string, the
    linker assigns the .EXE file type by default.

    If you do not specify a file name with the /EXECUTABLE qualifier,
    the linker creates an executable image with the file name of
    the first input file. If you append the /EXECUTABLE qualifier
    to an input file specification, the linker creates an executable
    image with the file name of the file to which the qualifier is
    appended.

 2.10 - /FULL

       /MAP/FULL

    Directs the linker to create a full image map file.

    For more information, see also the /MAP, /CROSS_REFERENCE, and
    /BRIEF qualifiers.

 2.11 - /GST

       /GST (default)
       /NOGST

    For Alpha linking, directs the linker to include in the global
    symbol table (GST) of a shareable image those symbols that have
    been declared as universal symbols in a symbol vector.

 2.12 - /HEADER

    When specified with the /SYSTEM qualifier, directs the linker to
    include an image header in a system image.

 2.13 - /INCLUDE

       library-name/INCLUDE=(module-name[,...])

    Identifies the input file specification to which it is appended
    as a library file and directs the linker to include in the link
    operation the module or modules specified as the value of the
    qualifier.

    The library-name specifies the name of the library from which
    you want a module or modules to be extracted.  The file name
    must specify a library file.  The linker assumes the default file
    type of .OLB.

    The module-name specifies the module or modules that you want to
    extract from the library. To specify more than one module, enclose
    the list in parentheses and separate the module names with commas.

 2.14 - /INFORMATIONALS

       /INFORMATIONALS (default)
       /NOINFORMATIONALS

    Directs the linker to output informational messages produced by a
    link operation.

 2.15 - /LIBRARY

       library-name/LIBRARY

    Identifies the input file specification to which it is appended
    as a library file and directs the linker to process the library's
    name table as part of its symbol resolution processing. When the
    linker finds in the library the definition of a symbol referenced
    in a previously processed input file, the linker includes from
    the library the module in which the symbol is defined.

    The library-name specifies the name of the library to be included
    in the link operation.  You must specify a library file name. The
    linker assumes the default file type of .OLB.

 2.16 - /MAP

       /MAP[=file-spec] (default in batch mode)
       /NOMAP (default in interactive mode)

    Directs the linker to create an image map file. For more
    information, see also the /BRIEF, /CROSS_REFERENCE, and /FULL
    qualifiers.

    If you enter a file specification with the /MAP qualifier, the
    linker creates an image map file with that file name. If you do
    not enter a file type after the file name, the linker assumes a
    file type of .MAP.

    If you do not enter a file specification with the /MAP qualifier,
    the linker creates an image map file with the file name of the
    first input file specified on the command line and the file type
    .MAP. (If no input files are specified on the command line, the
    linker names the map file .MAP.)

    If you append the /MAP qualifier to one of the input file
    specifications, the linker creates an image map file with the
    file name of the file to which the qualifier is appended, using
    the .MAP file type.

 2.17 - /NATIVE_ONLY

       /NATIVE_ONLY (default)
       /NONATIVE_ONLY

    For Alpha linking, prevents the linker from passing along
    procedure signature block (PSB) information in special fix-ups
    to the image activator. The image activator uses this information
    to build jackets so that native OpenVMS Alpha images can call
    translated OpenVMS VAX images. Note that this qualifier does not
    prevent incoming calls from translated OpenVMS VAX images.

 2.18 - /OPTIONS

       options-file-name/OPTIONS

    Identifies the input file specification to which it is appended
    as a linker options file.

    The options-file-name is the file specification of a linker
    options file.  The linker assumes the file type .OPT by default.

 2.19 - /P0IMAGE

    Directs the linker to place an executable image entirely in P0
    address space. When the /P0IMAGE qualifier is specified, the user
    stack and OpenVMS RMS buffers, which usually reside in P1 space,
    are placed in P0 space by the image activator.

 2.20 - /PROTECT

       /PROTECT
       /NOPROTECT (default)

    Directs the linker to protect an entire shareable image from
    user-mode write access and supervisor-mode write access. Must be
    specified with the /SHAREABLE qualifier.

 2.21 - /REPLACE

       /REPLACE (default)
       /NOREPLACE

    For Alpha linking, specifies that the linker should perform
    certain optimizations to improve the performance of the resultant
    image when instructed by the compiler.

 2.22 - /SECTION_BINDING

       /SECTION_BINDING=(CODE,DATA)
       /NOSECTION_BINDING (default)

    For Alpha linking, directs the linker to create an image that can
    be installed as a resident image and to flag coding practices in
    the image that would prevent this.

    CODE prevents the linker from replacing the Jump to Subroutine
    (JSR) instruction sequence with the more efficient Branch to
    Subroutine (BSR) instruction sequence when the target of the
    branch crosses an image section boundary.

    DATA directs the linker to check for address calculations that
    create dependencies on the layout of data image sections. The
    linker reports such occurrences.

    When the /SECTION_BINDING qualifier is specified without either
    the CODE or DATA keyword, the linker performs both types of
    checking by default.

 2.23 - /SELECTIVE_SEARCH

       input-file-name/SELECTIVE_SEARCH

    When you append this qualifier to an input file specification,
    the linker processes only those symbols in the input file that
    are referenced by previously processed input files.

    The input-file-name is the name of the input file you want
    included in the link operation. The /SELECTIVE_SEARCH qualifier
    works only with object modules and shareable images. This
    qualifier is illegal with library files. (To process the modules
    in a library selectively, specify the /SELECTIVE_SEARCH qualifier
    when inserting the files into the library. For more information,
    see the OpenVMS Command Definition, Librarian, and Message
    Utilities Manual.)

 2.24 - /SHAREABLE

       /SHAREABLE[=file-spec]
       shareable-image-file-name/SHAREABLE

    When specified anywhere on the link command line, the /SHAREABLE
    qualifier directs the linker to create a shareable image. When
    you append the /SHAREABLE qualifier to a file specification in
    a linker options file, the system identifies the input file as a
    shareable image.

    When you use the /SHAREABLE qualifier to create a shareable
    image, the file-spec specifies the name you want the linker
    to assign to the shareable image being created. If you do not
    include a file specification, the linker assigns the shareable
    image the name of the file to which you append the /SHAREABLE
    qualifier in the LINK command line. If you do not append the
    /SHAREABLE qualifier to an input file specification, the linker
    assigns to the shareable image the name of the first input file
    specified on the command line using the extension .EXE.

    If you designate a file name but omit the file type, the linker
    assigns the shareable image the file type .EXE.

    The shareable-image-file-name specifies the name of a shareable
    image.   Note that you can use the /SHAREABLE qualifier to
    identify a shareable image only in a linker options file. It is
    illegal to include a shareable image in a link operation by
    specifying it on the LINK command line.

 2.25 - /SYMBOL_TABLE

       /SYMBOL_TABLE[=file-spec]
       /NOSYMBOL_TABLE (default)

    Directs the linker to create a symbol table file.

    The file-spec specifies the character string you want the linker
    to use as the name of the symbol table file. If you do not
    include a file type in the character string, the linker appends
    the .STB file type to the file name.

    If you specify the /SYMBOL_TABLE qualifier without the file
    specification, the linker creates a symbol table file with the
    file name of the first input file and the default file type .STB.
    If you append the /SYMBOL_TABLE qualifier to one of the input
    file specifications, the linker creates a symbol table file with
    the file name of the file to which the qualifier is appended,
    with the default file type .STB.

 2.26 - /SYSEXE

       /SYSEXE[=[NO]SELECTIVE]
       /NOSYSEXE (default)

    For Alpha linking, directs the linker to process the system
    shareable image, SYS$BASE_IMAGE.EXE, in a link operation. The
    linker looks for SYS$BASE_IMAGE.EXE in the directory that the
    logical name ALPHA$LOADABLE_IMAGES points to.

    When you specify the SELECTIVE keyword, the linker processes the
    SYS$BASE_IMAGE.EXE file selectively, including only those symbols
    from the global symbol table of the SYS$BASE_IMAGE.EXE file
    that were referenced by input files previously processed in the
    link operation. When you specify the /SYSEXE qualifier without a
    keyword, the linker processes the executive image selectively.

    When you specify the NOSELECTIVE keyword, the linker includes all
    the symbols from the SYS$BASE_IMAGE.EXE global symbol table in
    the link operation.

    When you specify the /SYSEXE qualifier without a keyword, the
    linker processes the executive image selectively.

 2.27 - /SYSLIB

       /SYSLIB (default)
       /NOSYSLIB

    Directs the linker to process the default system shareable image
    library, IMAGELIB.OLB, and the default system object module
    library, STARLET.OLB, to resolve symbolic references that remain
    undefined after all specified input files and any default user
    libraries have been processed.

 2.28 - /SYSSHR

       /SYSSHR (default)
       /NOSYSSHR

    Directs the linker to process the default system shareable image
    library (IMAGELIB.OLB) to resolve symbolic references that remain
    undefined after all specified input files and any user libraries
    have been processed.

 2.29 - /SYSTEM

       /SYSTEM[=base-address]

    Directs the linker to create a system image and optionally allows
    you to specify the address at which the image should be loaded
    into memory. A system image cannot be activated with the RUN
    command; it must be bootstrapped or otherwise loaded into memory.

    The base-address specifies the address at which the image is to
    be loaded in virtual memory. You can specify a base address in
    hexadecimal (%X), octal (%O), or decimal (%D) format. The default
    base address is %X80000000.

    Note that if you specify the /HEADER qualifier, the linker
    adjusts the base address to the next highest page boundary if it
    is not already a page boundary. The next highest page boundary is
    the smallest number that is greater than the value specified in
    the base-address parameter and that is divisible by the default
    page size (which is architecture-specific) or the page size
    specified using the /BPAGE qualifier.

 2.30 - /THREADS_ENABLE

       /THREADS_ENABLE[=(MULTIPLE_KERNEL_THREADS,UPCALLS)]
       /NOTHREADS_ENABLE (default)

    Kernel threads allow a multithreaded application to have a
    thread executing on every CPU in a multiprocessor system. The
    /THREADS_ENABLE qualifier allows you to turn kernel threads
    on and off on a per-image basis.

    When you specify this qualifier, the OpenVMS linker sets the
    appropriate bits in the image header of the image being linked.
    These bits control the following:

    o Whether the image is allowed to enter a multiple kernel threads
      environment
    o Whether the image can receive upcalls from the OpenVMS scheduler

    On Alpha systems, the MULTIPLE_KERNEL_THREADS keyword sets the
    MULTIPLE_KERNEL_THREADS bit in the image header of the image being
    built.  This bit indicates to the image activator that the image
    can be run in a multiple kernel threads environment.

    If you specify this keyword for OpenVMS VAX links, it is ignored.

    The UPCALLS keyword sets the UPCALLS bit in the OpenVMS image
    header of the image being built. This bit indicates to the image
    activator that the process can receive upcalls from the OpenVMS
    scheduler.

 2.31 - /TRACEBACK

       /TRACEBACK (default)
       /NOTRACEBACK

    Directs the linker to include traceback information in the image
    file. If you specify the /DEBUG qualifier, the linker includes
    traceback information by default, overriding the /NOTRACEBACK
    qualifier if it is specified.

 2.32 - /USERLIBRARY

       /USERLIBRARY[=(table[,...])]
       /USERLIBRARY=ALL (default)
       /NOUSERLIBRARY

    Directs the linker to process one or more default user libraries
    to resolve symbolic references that remain undefined after all
    specified input files have been processed.

    Table specifies the logical name tables that the linker searches
    for default user libraries. The following keywords are the only
    acceptable parameter values:

    Keyword   Description

    ALL       Directs the linker to search the process, group, and
              system logical name tables for default user library
              definitions. This is the default.
    GROUP     Directs the linker to search the group logical name
              table for default user library definitions.
    NONE      Directs the linker not to search any logical name
              table; the /USERLIBRARY=NONE qualifier is equivalent
              to the /NOUSERLIBRARY qualifier.
    PROCESS   Directs the linker to search the process logical name
              table for default user library definitions.
    SYSTEM    Directs the linker to search the system logical name
              table for default user library definitions.

 2.33 - /VAX

    Directs the linker to produce an OpenVMS VAX image. The default
    action, when neither /ALPHA nor /VAX is specified, is to create
    an OpenVMS VAX image on an OpenVMS VAX system and to create an
    OpenVMS Alpha image on an OpenVMS Alpha system.
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.