Microsoft KB Archive/85884

{|
 * width="100%"|

FIX: /EXEPACK and MOVE Overlays Are Incompatible

 * }

Q85884

-

The information in this article applies to:


 * Microsoft LINK for MS-DOS

-

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.
 * 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 query words: 5.30 7.00 lock buglist5.30 fixlist5.31.009

Keywords : kb16bitonly

Issue type :

Technology : kbAudDeveloper kbZNotKeyword3 kbLINKSearch