Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

Parameters

Command Qualifiers

Positional Qualifiers

Examples

/BRIEF

/CONTIGUOUS

/CROSS_REFERENCE

/DEBUG

/EXECUTABLE

/FULL

/HEADER

/MAP

/P0IMAGE

/PROTECT

/SHAREABLE

/SYMBOL_TABLE

/SYSLIB

/SYSSHR

/SYSTEM

/TRACEBACK

/USERLIBRARY

/INCLUDE

/LIBRARY

/OPTIONS

/SELECTIVE_SEARCH

/SHAREABLE

HELP LINK — VMS 4.6

  Invokes the VAX/VMS Linker to link one or more object modules into a
  program  image,  and defines execution characteristics of the image.
  For a complete description of the linker, including more information
  about the LINK command, see the VAX/VMS Linker Reference Manual.

  Format:


    LINK  file-spec[,...]

Additional information available:

ParametersCommand QualifiersPositional QualifiersExamples

Parameters

 file-spec[,...]

  Specifies one or more input files.  The input files  can  be  object
  modules  to  be  linked,  libraries  to  be  searched  for  external
  references or from  which  specific  modules  are  to  be  included,
  shareable images to be included in the output image, or option files
  to be read by the linker.  If  you  specify  multiple  input  files,
  separate  the  file  specifications  with  commas or plus signs.  In
  either case, the linker creates a single image file.

  If you do not specify a file type in an  input  file  specification,
  the  linker  supplies default file types, based on the nature of the
  file.  All object modules are assumed to have file types of OBJ.

  No wildcard characters are allowed in the file specification.

Command Qualifiers

Additional information available:

/BRIEF/CONTIGUOUS/CROSS_REFERENCE/DEBUG/EXECUTABLE
/FULL/HEADER/MAP/P0IMAGE/PROTECT/SHAREABLE
/SYMBOL_TABLE/SYSLIB/SYSSHR/SYSTEM/TRACEBACK
/USERLIBRARY

/BRIEF

 /BRIEF

 Requests the linker to produce a brief map (memory allocation)  file.
  /BRIEF is valid only if /MAP is also specified.

  A brief form of the map contains:

  o  A summary of the image characteristics

  o  A list of all object modules included in the image

  o  A summary of link-time performance statistics

/CONTIGUOUS

 /CONTIGUOUS
 /NOCONTIGUOUS (default)

  Controls whether the output image file is contiguous.

/CROSS_REFERENCE

 /CROSS_REFERENCE
 /NOCROSS_REFERENCE

  Controls whether the memory  allocation  listing  (map)  contains  a
  symbol  cross-reference.   The  /CROSS_REFERENCE  qualifier is valid
  only if /MAP is also specified and /BRIEF is not specified.

  A symbol cross-reference lists each global symbol referenced in  the
  image, its value, and all modules in the image that refer to it.

/DEBUG

 /DEBUG[=file-spec]
 /NODEBUG

  Controls whether a debugger is included in the output image.

  If the object  module  contains  local  symbol  table  or  traceback
  information  for the debugger, you can specify /DEBUG to include the
  information in the image as well.  If the  object  module  does  not
  contain  symbol  table  or traceback information, and if you specify
  /DEBUG, only global symbols are available for symbolic debugging.

  The /DEBUG qualifier optionally accepts the name  of  an  alternate,
  user-specified debugger.  If a file specification is entered without
  a file type, the linker assumes the default file type  of  OBJ.   If
  you  specify  /DEBUG  without  a file specification, the default VAX
  Symbolic Debugger is linked with  the  image.   For  information  on
  using  the VAX Symbolic Debugger, see the VAX/VMS Debugger Reference
  Manual.

  No wildcard characters are allowed in the file specification.

/EXECUTABLE

 /EXECUTABLE[=file-spec]
 /NOEXECUTABLE

  Controls  whether  the  linker  creates  an  executable  image   and
  optionally provides a file specification for the output image file.

  By default, the linker creates an executable  image  with  the  same
  file  name as the first input file and a file type of EXE.  When you
  specify /EXECUTABLE, you can control the  defaults  applied  to  the
  output  file  specification by the placement of the qualifier in the
  command.

  You can use /NOEXECUTABLE or  /EXECUTABLE=NL:   to  test  a  set  of
  qualifiers,  options,  or  input object modules, without creating an
  image file.  However, it is recommended that you use /EXECUTABLE=NL:
  because   the   linker   will  not  process  certain  qualifiers  if
  /NOEXECUTABLE is used.

  No wildcard characters are allowed in the file specification.

/FULL

 /FULL

 Requests the  linker  to  produce  a  full  map  (memory  allocation)
  listing.  /FULL is valid only if /MAP is specified.

  A full listing contains the following information:

  o  All the information included in the brief listing (see /BRIEF)

  o  Detailed descriptions of each program section and  image  section
     in the image file

  o  Lists of global symbols by name and by value

/HEADER

 /HEADER

 Provides a header on a system image when used in conjunction with the
  /SYSTEM  qualifier.  All other images always have headers.  However,
  by default, system images do not have headers.

/MAP

 /MAP[=file-spec]
 /NOMAP

  Controls whether a memory allocation listing (map) is  produced  and
  optionally defines the file specification.  If you specify /MAP, you
  can also specify /BRIEF, /FULL, or /CROSS_REFERENCE to  control  the
  contents of the map.  If you do not specify any of these qualifiers,
  the map contains:

  o  All the information contained in a brief listing (see /BRIEF)

  o  A list of user-defined global symbols by name

  o  A list of user-defined program sections

  When you specify /MAP, you can control the defaults applied  to  the
  output  file  specification,  as  described  in Section 2.4.4 of the
  VAX/VMS DCL Concepts Manual.  In interactive mode,  the  default  is
  /NOMAP.  However, in batch mode, the default is /MAP.

/P0IMAGE

 /P0IMAGE

 Directs the linker to create an image  that  is  stored  only  in  P0
  address space.  The linker places the stack and VAX RMS buffers that
  usually go in P1 address space in P0 address  space.   The  /P0IMAGE
  qualifier is used to create executable images that modify P1 address
  space.  See the VAX Architecture Handbook for a  description  of  P0
  and P1 address space.

/PROTECT

 /PROTECT

 When used in conjunction with the /SHAREABLE qualifier, the  /PROTECT
  qualifier  directs the linker to create a protected shareable image.
  A protected shareable  image  can  execute  privileged  change  mode
  instructions  even when it is linked into a nonprivileged executable
  image.

/SHAREABLE

 /SHAREABLE[=file-spec]
 /NOSHAREABLE

  Requests the linker to produce a shareable image file rather than an
  executable image.

  Shareable images should not be run with the RUN  command.   However,
  they  can be linked with object modules to create executable images.
  By default, the linker creates an executable image.  If you  specify
  both  /EXECUTABLE  and  /SHAREABLE,  the /SHAREABLE qualifier always
  takes precedence.

  When you specify /SHAREABLE, you can control the defaults applied to
  the  output  file specification by the placement of the qualifier in
  the command.

  To specify an input shareable image, the /SHAREABLE  qualifier  must
  be  used  as  an  input  file qualifier in an options file.  See the
  description of the linker in the VAX/VMS Linker Reference Manual.

  No wildcard characters are allowed in the file specification.

/SYMBOL_TABLE

 /SYMBOL_TABLE[=file-spec]
 /NOSYMBOL_TABLE

  Requests the linker to create  a  separate  file  containing  symbol
  definitions  for  all  global symbols in the image.  The output file
  will be in object module format.

  If you also specify /DEBUG, the linker includes  the  global  symbol
  definitions in the image for use by the debugger, and also creates a
  separate symbol table file.  The symbol table file can  be  used  as
  input to subsequent LINK commands, to provide the symbol definitions
  to other images.

  By default, the linker does not create a symbol table file.

  When you specify /SYMBOL_TABLE, you can control the defaults applied
  to  the output file specification.  The output file type defaults to
  STB.

  No wildcard characters are allowed in the file specification.

/SYSLIB

 /SYSLIB
 /NOSYSLIB

  Controls whether the default system library is to  be  automatically
  searched  for  unresolved  references.   The  default system library
  consists of the  shareable  image  library,  IMAGELIB.OLB,  and  the
  module library, STARLET.OLB.

  By  default,  the  linker  searches  the  shareable  image  library,
  SYS$LIBRARY:IMAGELIB.OLB,       and       then      the      library
  SYS$LIBRARY:STARLET.OLB when it cannot resolve references using  the
  input files specified in the command.

  If you specify /NOSYSLIB, neither IMAGELIB.OLB  nor  STARLET.OLB  is
  searched.

/SYSSHR

 /SYSSHR
 /NOSYSSHR

  Controls whether the linker searches the  default  system  shareable
  image library, IMAGELIB.OLB when it cannot resolve references in the
  input files specified.

  By  default,  the  linker  searches  the  shareable  image  library,
  IMAGELIB.OLB  and then the object module library STARLET.OLB when it
  cannot resolve references using the input files specified.  Use  the
  /NOSYSSHR qualifier to request that only STARLET.OLB be searched.

/SYSTEM

 /SYSTEM[=base-address]
 /NOSYSTEM

  Requests the linker to produce a system image and optionally defines
  a base address for the image.  A system image cannot be run with the
  RUN command; it  must  be  bootstrapped  or  otherwise  loaded  into
  memory.

  The base address specifies the virtual memory location at which  the
  image  is  to  be  loaded.  The address can be expressed in decimal,
  hexadecimal, or octal format, using the radix specifiers %D, %X,  or
  %O,  respectively.  If you do not specify a base address, the linker
  uses the default address of %X80000000.

  If you specify /SYSTEM, you  cannot  specify  either  /SHAREABLE  or
  /DEBUG.

  System images are intended for special purposes, such as stand-alone
  operating  system  diagnostics.   When  the  linker creates a system
  image, it orders the program  sections  in  alphanumeric  order  and
  ignores all program section attributes.

/TRACEBACK

 /TRACEBACK (default)
 /NOTRACEBACK

  Controls whether the linker includes traceback  information  in  the
  image  file.   By default, the linker includes traceback information
  so that the system can trace the call stack when  an  error  occurs.
  If you specify /NOTRACEBACK, there is no traceback reporting when an
  error occurs.

  If you specify /DEBUG, /TRACEBACK is assumed.

/USERLIBRARY

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

  Controls  whether  the  linker  searches  any  user-defined  default
  libraries  after it has searched any specified user libraries.  When
  you specify the /USERLIBRARY  qualifier,  the  linker  searches  the
  process,  group,  and  system  logical  name tables to find the file
  specifications of the user-defined libraries.   (The  discussion  of
  the   linker   in  the  VAX/VMS  Linker  Reference  Manual  explains
  user-defined default  libraries.)  You  can  specify  the  following
  tables for the linker to search:

  ALL        The  linker  searches  the  process,  group,  and  system
             logical name tables for user-defined library definitions.

  GROUP      The linker searches the  group  logical  name  table  for
             user-defined library definitions.

  NONE       The linker does not search any logical name  table;  this
             specification is equivalent to /NOUSERLIBRARY.

  PROCESS    The linker searches the process logical  name  table  for
             user-defined library definitions.

  SYSTEM     The linker searches the system  logical  name  table  for
             user-defined library definitions.

  If you do not specify either /NOUSERLIBRARY or /USERLIBRARY=(table),
  the linker assumes /USERLIBRARY=ALL by default.

  The /NOUSERLIBRARY qualifier tells the  linker  not  to  search  any
  user-defined default libraries.

Positional Qualifiers

Additional information available:

/INCLUDE/LIBRARY/OPTIONS/SELECTIVE_SEARCH/SHAREABLE

/INCLUDE

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

 Indicates that the associated input file is an object module  library
  or shareable image library, and that only the module names specified
  are to be unconditionally included as input to the linker.

  At least one module name must be specified.   If  you  specify  more
  than one module name, separate them with commas and enclose the list
  in parentheses.

  If you specify /INCLUDE, you can also specify /LIBRARY; the  library
  is then searched for unresolved references.

  No  wildcard   characters   are   allowed   in   the   module   name
  specifications.

/LIBRARY

 /LIBRARY

 Indicates that the associated input file is a library to be  searched
  for modules to resolve any undefined symbols in the input files.

  If the associated input file specification does not include  a  file
  type,  the  linker assumes the default file type of OLB.  You cannot
  specify a library as the first input file unless  you  also  specify
  the  /INCLUDE qualifier to indicate which modules in the library are
  to be included in the input.  You can use both /INCLUDE and /LIBRARY
  to  qualify  a  file  specification.   In  this  case,  the explicit
  inclusion of modules occurs first,  then  the  library  is  used  to
  search for unresolved references.

/OPTIONS

 /OPTIONS

 Indicates that the associated input file contains a list  of  options
  to  control  the  linking.   If  you  specify  /OPTIONS  and  if the
  associated input file specification does not include  a  file  type,
  the linker uses the default file type of OPT.

  For complete details on the contents of an  options  file,  see  the
  VAX/VMS Linker Reference Manual.

/SELECTIVE_SEARCH

 /SELECTIVE_SEARCH

 Indicates that the associated input file is  an  object  module.   It
  also  indicates  that any symbols defined in the module that are not
  necessary to resolve outstanding references should be excluded  from
  the  symbol  table of the output image file.  These symbols are also
  excluded from the symbol table file, if /SYMBOL_TABLE is  specified.
  The binary code in the object module is always included.

/SHAREABLE

 /SHAREABLE
 /SHAREABLE=NOCOPY

  Identifies an input file as a shareable image file.   You  must  use
  this  qualifier in an options file rather than in the command string
  in order to identify the file as an input file.   NOCOPY  tells  the
  linker  not  to  bind  a  private copy of the shareable image to the
  executable image.  /SHAREABLE and /SHAREABLE=NOCOPY are equivalent.

Examples

  1.   $ LINK ORION

  The linker links the object module in the file ORION.OBJ and creates
  an executable image named ORION.EXE.

  2.   $ LINK/MAP/FULL DRACO,CYGNUS,LYRA

  The linker links the modules DRACO.OBJ, CYGNUS.OBJ, and LYRA.OBJ and
  creates  an  executable  image  named DRACO.EXE.  The /MAP and /FULL
  qualifiers request a full map of the  image,  with  descriptions  of
  each  program section, lists of global symbols by name and by value,
  and a summary of the image characteristics.  The map file  is  named
  DRACO.MAP.

  3.   $ LINK [SSTEST]SERVICE/INCLUDE=DRACO, -
       $_[]CYGNUS/EXECUTABLE

  The LINK command links the object  module  DRACO  from  the  library
  SERVICE.OLB  in  the  directory SSTEST with the module CYGNUS.OBJ in
  the current  default  directory.   The  executable  image  is  named
  CYGNUS.EXE.  The placement of the /EXECUTABLE qualifier provides the
  output file name default.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026