FIX: /EXEPACK and MOVE Overlays Are Incompatible

ID: Q85884

5.30 MS-DOS kbtool kbbuglist kbfixlist

The information in this article applies to:

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:

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
Version           : 5.30
Platform          : MS-DOS
Solution Type     : kbfix

Last Reviewed: September 19, 1997