DOCUMENT:Q72480 06-MAY-2001 [masm] TITLE :FIX: MASM 5.1/5.1a .OBJ May Cause LINK to Generate L2013 Error PRODUCT :Microsoft Macro Assembler PROD/VER::5.1,5.1a OPER/SYS: KEYWORDS: ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Macro Assembler (MASM), versions 5.1, 5.1a ------------------------------------------------------------------------------- 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 "MS-DOS Encyclopedia." 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 : Technology : kbMASMsearch kbAudDeveloper kbMASM510 kbMASM510a Version : :5.1,5.1a Solution Type : kbfix ============================================================================= 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 2001.