Microsoft KB Archive/87790

= DOCERR: Incorrectly States /PACKC Is Off by Default =

Article ID: 87790

Article Last Modified on 10/23/2003

-

APPLIES TO


 * Microsoft LINK for MS-DOS 5.1
 * Microsoft LINK for MS-DOS 5.11
 * Microsoft LINK for MS-DOS 5.13
 * Microsoft LINK for MS-DOS 5.15
 * Microsoft LINK for MS-DOS 5.2
 * Microsoft LINK for OS/2 5.1
 * Microsoft LINK for OS/2 5.11
 * Microsoft LINK for OS/2 5.13
 * Microsoft LINK for OS/2 5.15

-



This article was previously published under Q87790



SUMMARY
According to the printed and online documentation for versions of Microsoft LINK earlier than version 5.3, the default setting for the /PACKC[ODE] linker option switch is off. This statement is incorrect.

The documentation for LINK version 5.3 includes the following correct statement:

Code-segment packing is on by default for segmented executable files and for DOS programs created with overlays or with the /TINY option.

The /NOPACKC[ODE] switch turns code-segment packing off.



MORE INFORMATION
To see how code packing changes the executable file, examine the map file that LINK creates. In the two partial map files below, each logical segment has a distinct physical segment address when the file is linked with /NOPACKCODE but the logical segments share a physical segment when /PACKCODE is on (the default behavior). Start     Length      Name 0001:0000 0114CH      _TEXT 0002:0000 00972H      MOD_TEXT      //  code packing off /NOPACKCODE 0003:0000 0137DH      MOD2_TEXT 0004:0000 0021EH      MOD3_TEXT Start     Length      Name 0001:0000 00934H      _TEXT 0001:0934 01354H      MOD_TEXT      // code packing on   (default) 0001:1C88 00ADAH      MOD2_TEXT 0001:2762 014ABH      MOD3_TEXT The /PACKCODE switch is documented incorrectly in the following four locations:
 * Microsoft C &quot;Reference&quot; manual for version 6.0, page 31
 * Microsoft FORTRAN &quot;Environment and Tools&quot; manual for version 5.1, version 379
 * Microsoft Macro Assembler (MASM) &quot;Programmer's Guide&quot; manual for version 6.0, page 354
 * Microsoft QuickC for Windows (QC/Win) &quot;Toolkit&quot; manual for version 1.0, page 219

Additional query words: 5.10 5.11 5.13 5.15 5.20

Keywords: kb16bitonly KB87790

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.