L2029 on __edata and __end May Be Caused by Old Linker

Last reviewed: July 17, 1997
Article ID: Q85495
7.00 | 1.00 1.50 MS-DOS | WIDOWS kbtool

The information in this article applies to:

  The Linker (LINK.EXE) included with
    - Microsoft C/C++ for MS-DOS, version 7.0
    - Microsoft Visual C++ for Windows, versions 1.0 and 1.5

SUMMARY

The following error may be generated when using a linker other than the Microsoft Segmented-Executable Linker (LINK) version 5.3 or 5.5:

   error L2029: '__edata' : unresolved external
   error L2029: '__end' : unresolved external

MORE INFORMATION

LINK version 5.3 or 5.5 creates the two symbols __edata and __end when the LINK option /DOSSEG is used. If a program is compiled by a Microsoft high-level language compiler, or if an assembly program written in Microsoft MASM uses the .DOSSEG directive, LINK uses the /DOSSEG option automatically.

LINK gives __edata the address of the beginning of BSS segment and gives __end the address of the end of BSS segment. Because the STACK segment is directly above the BSS segment, the address of __end also marks the lowest address of the STACK segment.

In earlier versions of LINK, these two symbols are _edata and _end. An extra underscore was added to these symbols to comply with the ANSI standard. Because the C/C++ startup code references __edata and __end, they are unresolved when using earlier linkers.


Additional reference words: kbinf 5.30
KBCategory: kbtool
KBSubcategory: LinkIss
Keywords : kb16bitonly


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.

Last reviewed: July 17, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.