DOCERR: L4011, L1005 Errors When /PACKCODE Value Too Large (50705)



The information in this article applies to:

  • Microsoft LINK for MS-DOS 4.x
  • Microsoft LINK for MS-DOS 5.0x
  • Microsoft LINK for MS-DOS 5.1x
  • Microsoft LINK for MS-DOS 5.2x
  • Microsoft LINK for MS-DOS 5.3x
  • Microsoft LINK for MS-DOS 5.5
  • Microsoft LINK for MS-DOS 5.6
  • Microsoft LINK for OS/2 5.0x
  • 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 Q50705

SYMPTOMS

An attempt to link an application fails and Microsoft LINK generates one of the following messages:
L4011: PACKCODE value exceeding 65500 unreliable
L1005: packing limit exceeds 65536 bytes

CAUSE

The L4011 error occurs when the linker command line specifies the /PACKCODE:n option and the value of "n" is between 65,501 and 65,536. The L1005 error occurs when the value of "n" exceeds 65,536.

RESOLUTION

Modify the linker command line to specify a value for "n" between 0 and 65,500.

MORE INFORMATION

The Microsoft LINK code-packing option, /PACKC[ODE][:n], combines neighboring code segments into one segment that has a maximum size of "n" bytes. The /PACKC option produces reliable results only when "n" is between 0 and 65,500.

According to page 278 of the Microsoft C "CodeView and Utilities" manual for version 5.1, the default value for "n" is 65,530. This incorrect statement is repeated in the Microsoft Macro Assembler (MASM) "CodeView and Utilities" manual for version 5.1 and in the Microsoft Pascal documentation.

Prior to LINK version 5.03, the abbreviation for the /PACKCODE option was /PAC. The abbreviation was changed in version 5.03 to differentiate /PACKC[ODE] from the new /PACKD[ATA] option.

Modification Type:MajorLast Reviewed:10/23/2003
Keywords:kb16bitonly KB50705