L2029 on __edata and __end May Be Caused by Old Linker

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

Last Reviewed: July 18, 1997