Cannot Combine P-code and Overlays

ID: Q87529

7.00 | 1.00 1.50 MS-DOS | WINDOWS kbprg

The information in this article applies to:

SUMMARY

It is not possible to create an overlaid MS-DOS program from code that has been compiled into p-code.

MORE INFORMATION

Attempting to create an overlaid MS-DOS program from object modules that have been compiled into p-code will cause the linker to generate the following warning message:

   LINK : warning L4013: Overlays : option ignored for
          segmented-executable file

LINK versions 5.3 and 5.31.009 supplied with Microsoft C/C++ version 7.0 then generates L2029 "unresolved external" error messages for the following symbols:

   $$COVL
   $$OVLTHUNKEND
   $$MPOVLSIZE
   $$MPOVLLFA
   $$INTNO
   $$MPGSNOVL
   $$MPGSNBASE
   $$OVLTHUNKBEG
   $$CGSN

LINK versions 5.5 and 5.6 supplied with Microsoft Visual C/C++ generate the L4013 warning but do not generate the L2029 errors.

The linker generates the L4013 warning because compiling with the /Oq option and linking with the /PCODE option causes the linker to create a segmented executable file. MS-DOS executables are normally non-segmented. However, the Make P-code utility (MPC), which must be run on a p-code executable to make it runnable, requires a segmented executable. It is not currently possible to specify overlays for a segmented executable. This limitation applies to using both static overlays as well as the Microsoft Overlay Virtual Environment (MOVE). The symbols that are listed as unresolved externals are being referenced by the MOVE routines in the medium and large memory model run-time libraries. These symbols are ordinarily resolved by the overlay manager. However, because the overlay manager is not linked in by the linker, these symbols are not defined.

Most of these errors also occur when specifying /OLDOVERLAY and using the parenthetical notation to specify the old static overlays. Specifically, L2029, "unresolved external" errors occur for the following symbols:

   $$OVLBASE
   $$EXENAM
   $$MPOVLLFA
   $$INTNO
   $$MPGSNOVL
   $$MPGSNBASE

Additional reference words: kbinf 1.00 1.50 7.00 5.30 5.50 5.60 packed pcode KBCategory: kbprg KBSubcategory: MoveOverlay StaticOverlay Keywords : kb16bitonly

Last Reviewed: July 18, 1997