LINK Help (linker.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
LINK's Output
◄Up► ◄Contents► ◄Index► ◄Back►
─────LINK───────────────────────────────────────────────────────────────────
Main Output File
LINK can create executable files for DOS or Windows. The kind of
file produced is determined by the way the source code is compiled
and the information supplied to LINK. LINK's output is either an
executable file or a dynamic-link library (DLL).
LINK creates a file according to the following rules:
■ If a .DEF file is specified, LINK creates a segmented
executable file. The type is determined by the EXETYPE
and LIBRARY statements.
■ If a .DEF file is not specified, LINK creates a DOS program.
■ If an overlay number is specifed in a SEGMENTS or FUNCTIONS
statement, LINK creates an overlaid DOS program. This
overrides a conflicting .DEF file specification.
■ If /DYNAMIC or /OLDOVERLAY is specified, or if parentheses
are used in the <objects> field, LINK creates an overlaid DOS
file. This overrides a conflicting .DEF file specification.
■ If an object file or library module contains an export
definition (an EXPDEF record), LINK creates a segmented
executable file. This overrides an overlay specification.
The __export keyword creates an EXPDEF record in a C program.
Microsoft C libraries for protect mode contain EXPDEF
records, so linking with a protect-mode default library
creates a segmented executable file.
■ If an import library is specified, LINK creates a segmented
executable file.
Map File
LINK can also create a map file that lists the segments in the
executable file and can list additional information. The /LINE and
/MAP options control the content of the map file.
See: ◄<mapfile> Field►
◄/LINE Option►
◄/MAP Option►
Other Files
The following options cause LINK to produce other output files:
■ LINK produces a .COM file instead of an .EXE file when the
/TINY option is specified.
■ The combination of /CO and /TINY puts debugging information
into a .DBG file.
■ A Quick library results when the /Q option is specified.
See: ◄/CO Option►
◄/Q Option►
◄/TINY Option►
-♦-