Microsoft KB Archive/72480

= FIX: MASM 5.1/5.1a .OBJ May Cause LINK to Generate L2013 Error =

Article ID: 72480

Article Last Modified on 10/22/2003

-

APPLIES TO


 * Microsoft Macro Assembler 5.1 Standard Edition
 * Microsoft Macro Assembler 5.1a

-



This article was previously published under Q72480



SYMPTOMS
The Microsoft Macro Assembler (MASM) versions 5.1 and 5.1a may create an object file that cannot be linked properly with LINK because of an LIDATA record that is too large for LINK to handle. In this case, the following LINK error will be generated:

error L2013: LIDATA record too large



CAUSE
The problem results from the fact that MASM may generate an LIDATA record up to 1K in size, which is valid for LIDATA records in the Intel Object Module Format, but LINK will only accept LIDATA records that are 512 bytes or less. There is nothing actually wrong with the code generated by MASM except for the fact that it may contain an object module record that exceeds a documented limitation of LINK.



RESOLUTION
In MASM version 6.0, the assembler automatically corrects for this situation by creating multiple LIDATA records as necessary so that none exceed 512 bytes.



STATUS
Microsoft has confirmed this to be a problem in MASM versions 5.1 and 5.1a. This problem was corrected in MASM version 6.0.



MORE INFORMATION
The sample code below demonstrates this problem. While MASM 5.1 and 5.1a will correctly assemble the code, the object file created will cause the following error when linked:

error L2013: LIDATA record too large pos: 29E Record type: A2

For more information on the LIDATA record, or any other object module record, see the &quot;MS-DOS Encyclopedia.&quot;

Sample Code
;Assemble options needed: none

s      STRUC fld000 DB      10 dup ( ' ' ) fld001 DB      10 dup ( ' ' ) fld002 DB      10 dup ( ' ' ) fld003 DB      10 dup ( ' ' ) fld004 DB      10 dup ( ' ' ) fld005 DB      10 dup ( ' ' ) fld006 DB      10 dup ( ' ' ) fld007 DB      10 dup ( ' ' ) fld008 DB      10 dup ( ' ' ) fld009 DB      10 dup ( ' ' ) fld010 DB      10 dup ( ' ' ) fld011 DB      10 dup ( ' ' ) fld012 DB      10 dup ( ' ' ) fld013 DB      10 dup ( ' ' ) fld014 DB      10 dup ( ' ' ) fld015 DB      10 dup ( ' ' ) fld016 DB      10 dup ( ' ' ) fld017 DB      10 dup ( ' ' ) fld018 DB      10 dup ( ' ' ) fld019 DB      10 dup ( ' ' ) fld020 DB      10 dup ( ' ' ) fld021 DB      10 dup ( ' ' ) fld022 DB      10 dup ( ' ' ) fld023 DB      10 dup ( ' ' ) fld024 DB      10 dup ( ' ' ) fld025 DB      10 dup ( ' ' ) fld026 DB      10 dup ( ' ' ) fld027 DB      10 dup ( ' ' ) fld028 DB      10 dup ( ' ' ) fld029 DB      10 dup ( ' ' ) fld030 DB      10 dup ( ' ' ) fld031 DB      10 dup ( ' ' ) fld032 DB      10 dup ( ' ' ) fld033 DB      10 dup ( ' ' ) fld034 DB      10 dup ( ' ' ) fld035 DB      10 dup ( ' ' ) fld036 DB      10 dup ( ' ' ) fld037 DB      10 dup ( ' ' ) fld038 DB      10 dup ( ' ' ) fld039 DB      10 dup ( ' ' ) fld040 DB      10 dup ( ' ' ) fld041 DB      10 dup ( ' ' ) fld042 DB      10 dup ( ' ' ) fld043 DB      10 dup ( ' ' ) fld044 DB      10 dup ( ' ' ) fld045 DB      10 dup ( ' ' ) fld046 DB      10 dup ( ' ' ) fld047 DB      10 dup ( ' ' ) fld048 DB      10 dup ( ' ' ) fld049 DB      10 dup ( ' ' ) fld050 DB      10 dup ( ' ' ) fld051 DB      10 dup ( ' ' ) fld052 DB      10 dup ( ' ' ) fld053 DB      10 dup ( ' ' ) fld054 DB      10 dup ( ' ' ) fld055 DB      10 dup ( ' ' ) fld056 DB      10 dup ( ' ' ) fld057 DB      10 dup ( ' ' ) fld058 DB      10 dup ( ' ' ) fld059 DB      10 dup ( ' ' ) s      ENDS

_TEXT  SEGMENT word public 'CODE'

main   PROC    far main   ENDP

_TEXT  ENDS

_DATA  SEGMENT word public 'DATA' sinst  s       <> _DATA  ENDS

END

Additional query words: 5.10 5.10a buglist5.10 buglist5.10a fixlist6.00

Keywords: kbfix KB72480

-

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

© Microsoft Corporation. All rights reserved.