PRB: Empty Segments in Program Overlay, Empty MOVE.TRC File

Last reviewed: July 17, 1997
Article ID: Q91644
5.30 5.31.009 5.50 5.60 MS-DOS kbtool kbprb

The information in this article applies to:

  • Microsoft LINK for MS-DOS, versions 5.3, 5.31.009, 5.5, and 5.6

SYMPTOMS

Using LINK version 5.3 and above, an application created with the MOVE overlay syntax is not recognized to contain overlays. Each segment specified in the SEGMENTS statement in the module definition (DEF) file is empty. In a tracing version of the application, the trace file, MOVE.TRC, is also empty.

CAUSE

When the /Gy compiler option switch is specified, the compiler places the code for each module into segments named comdat_segN, where N is assigned successive integer values as segments fill up. The linker creates empty segments of the form modulename_text and places them into the specified overlays. Because each of the overlays is empty, the MOVE.TRC file produced by the tracing version of the overlaid program is also empty.

RESOLUTION

Perform one of the following two methods to avoid this situation:

  • Specify the overlays in the DEF file using the FUNCTIONS statement instead of the SEGMENTS statement. Function code is placed in the appropriate comdat_segN segment in the overlay.
  • Remove the /Gy option switch from the compiler command line.


Additional reference words: 5.30 5.31.009 5.50 5.60
KBCategory: kbtool kbprb
KBSubcategory: MoveOverlay
Keywords : kb16bitonly


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: July 17, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.