FIX: /EXEPACK and MOVE Overlays Are Incompatible

Last reviewed: September 16, 1997
Article ID: Q85884
5.30 MS-DOS kbtool kbbuglist kbfixlist

The information in this article applies to:

  • Microsoft LINK for MS-DOS, version 5.3

SYMPTOMS

Using the /EXEPACK option with the Microsoft Segmented-Executable Linker (LINK) version 5.3 on a program that uses MOVE overlays causes problems. The program may act unexpectedly, hang, or generate invalid instruction errors when the first function in an overlay is called.

CAUSE

/EXEPACK and dynamic overlays (MOVE) are incompatible. When a program linked with /EXEPACK is run, control is given to an expander/relocator, the load module is unpacked, then control is transferred to the program (in this case, the overlay manager). The code in the overlays is not unpacked.

RESOLUTION

To resolve this problem, do one of the following:

  • Use /OLDOVERLAY with /EXEPACK so that the static overlay manager is used instead of dynamic overlay manager.

    -or-

  • Use dynamic overlays without using /EXEPACK.

Link 5.31 containes a new warning, L4087, which warns that the DYNAMIC option disables /EXEPACK. The 5.31 linker will ignore /EXEPACK for MOVE aplications, preventing the problems mentioned above.

STATUS

Microsoft has confirmed this to be a problem in LINK version 5.3. This problem has been fixed in LINK version 5.31. This version of LINK is contained in the C/C++ 7.0 patch disk, which can be obtained through Microsoft Product Support Services.

MORE INFORMATION

The /EXEPACK option directs LINK to remove series of repeated bytes (usually null characters) and to optimize the load-time relocation table before creating the executable file. At run time, the expander/relocator expands the bytes, performs the relocations, and transfers control. Execution then precedes normally.

The tools for creating dynamically overlaid programs are LINK 5.3 and the Microsoft Overlaid Virtual Environment (MOVE) in MOVE.LIB, which is a component of the combined libraries for medium and large models provided with Microsoft C/C++ version 7.0.

A dynamically overlaid program consists of one .EXE file that remains open during execution. MOVE reads this file when it needs to load an overlay. Overlays are loaded on call; initially, only the root of the program is loaded into memory.

The linker option /OLDOVERLAY is used to specify that static overlays should be used instead of MOVE.


Additional reference words: 5.30 7.00 lock buglist5.30 fixlist5.31.009
KBCategory: kbtool kbbuglist kbfixlist
KBSubcategory: MoveOverlay
Keywords : kb16bitonly MoveOverlay kbbuglist kbfixlist kbtool
Version : 5.30
Platform : MS-DOS
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 16, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.