KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q43128: Producing an _TEXT Segment for Multiple Object Modules

Article: Q43128
Product(s): See article
Version(s): 3.x 4.06 | 5.01.20 5.01.21
Operating System(s): MS-DOS | OS/2
Keyword(s): ENDUSER | S_C | mspl13_basic
Last Modified: 6-APR-1989

In a map file, a <modulename>_TEXT will be produced for each logical
code segment in your program. Since small and compact model programs
have only one code segment, you only get one logical segment, _TEXT.
Medium- and large-model programs, however, will have a separate
logical segment for each object module in the program, and thus produce
a <modulename>_TEXT for each logical segment.

To generate a map file, use the /M option with LINK or the /Fm option
with CL.

The following is an example map file generated when compiling a
program with two object modules in small-memory model:

 Start  Stop   Length Name                   Class
 00000H 016EAH 016EBH _TEXT                  CODE
 ...

The following is an example map file generated when compiling the same
program with two object modules in large-memory model:

 Start  Stop   Length Name                   Class
 00000H 0000DH 0000EH MAPL_TEXT              CODE
 0000EH 00023H 00016H MAP2_TEXT              CODE
 00024H 01B2CH 01B09H _TEXT                  CODE
 ...

MAPL_TEXT and MAP2_TEXT come from the files MAPL.OBJ and MAP2.OBJ,
respectively. The _TEXT is the Microsoft run-time library and any
third-party libraries.

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.

Copyright Microsoft Corporation 1986-2002.