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.
Compiling for Overlays
◄Up► ◄Contents► ◄Index► ◄Back►
─────LINK───────────────────────────────────────────────────────────────────
Memory Models
An overlaid program must be in either a medium or large model.
Only the medium and large combined libraries in C/C++ version 7.0
contain the MOVE library. Code references must be far.
Packaged Functions
A function can be assigned to an overlay independently from other
functions in the same segment only if it is a packaged function. A
function that is not packaged cannot be assigned to an overlay;
however, its entire segment can be placed in an overlay.
See: ◄Packaged Functions►
Explicit Allocation
A function is explicitly allocated if it is assigned to a segment
at compile time. An explicitly allocated function cannot be
assigned to a different overlay from its segment. Methods of
explicit allocation include the following:
■ In C source code, the __based keyword (or its predecessor,
the alloc_text pragma) specifies the segment where an
individual function is to reside.
■ On the CL command line, the /NT option specifies the segment
where all functions in an object file are to reside.
Anonymous Allocation
A function not explicitly allocated to a segment is sometimes
referred to as an anonymous function. In programs compiled in
medium and large models, anonymous functions are allocated to a
segment that has a name in the form:
objfile_TEXT
where <objfile> is the name of the file containing the functions.
MOVE Library Routines
The MOVE library provides several routines for use in advanced
techniques of overlay programming. These routines are described in
the MOVEAPI.TXT file distributed with Microsoft C/C++ version 7.0.
-♦-