Microsoft KB Archive/86812

{|
 * width="100%"|

FIX: LINK 5.3 Consumes All Available Free Disk Space or Hangs

 * }

Q86812

-

The information in this article applies to:


 * Microsoft LINK for MS-DOS, version 5.3

-

SYMPTOMS
An attempt to link an application fails when Microsoft LINK version 5.3 consumes all available free disk space and hangs. The exact symptoms depend on the specified command-line options and on the linked code. Some of the behaviors are as follows:

 LINK writes data to an executable file until no free disk space is available, then LINK hangs. It is necessary to boot the computer to regain control. LINK writes data to an executable file until no free disk space is available, then LINK gives an Invalid Fault in the Windows operating system. LINK generates lost clusters until no free disk space is available, then LINK gives an Invalid Fault in the Windows operating system.  LINK prints one string repeatedly until the user presses CTRL+C. Then LINK displays the message

null pointer assignment.

LINK also generates an executable file that consumes all available free disk space. 

CAUSE
These problems occur when LINK attempts to write CodeView information and a symbol is defined as both a data item and a function in the same object module. In other words, these problems occur when all of the following five conditions occur simultaneously:


 * The code contains two symbols that differ from each other only in capitalization (for example, ExtraBytes and EXTRABYTES).
 * The two symbols reside in the same object module (.OBJ) file.
 * The LINK command line does not specify the /NOI[GNORECASE] option.
 * The LINK command line specifies the /CODEVIEW option.
 * The symbols are defined such the first one creates a COMDEF (function) record and the second one creates a PUBDEF (data) record.

RESOLUTION
To work around this problem, perform one of the following four steps:


 * 1) Change the name of one of the conflicting symbols
 * 2) Modify the LINK command line to specify the /NOIGNORECASE option
 * 3) Modify the LINK command line to remove the /CODEVIEW option
 * 4) Modify the application source code to initialize the data item

STATUS
Microsoft has confirmed this to be a problem in LINK version 5.3 for MS-DOS (provided with Microsoft C/C++ version 7.0 for MS-DOS and Windows). This problem was corrected in LINK version 5.31.009 for MS-DOS (provided with the C/C++ version 7.0a for MS-DOS and Windows patch disk). To obtain the patch disk, obtain a disk from Microsoft. To obtain a disk in the United States, call Microsoft Product Support Services at (206) 454-2030. Outside the United States, contact the Microsoft subsidiary for your area. To locate your subsidiary, go to the Microsoft Web site http://www.microsoft.com/worldwide/default.htm

MORE INFORMATION
The following code example demonstrates this problem. LINK generates the following message and hangs:

L2025: _FuncName: symbol defined more than once

If the application initializes FUNCNAME to a value or if the LINK command line omits the /CODEVIEW option switch, the L2025 error persists but LINK does not hang. To eliminate the error completely, rename one of the symbols or specify the /NOIGNORECASE LINK option.

Sample Code
/* * Compile options needed: /c *   Link options needed: /CO */


 * 1) include 

void FuncName(int i) { printf(&quot;function called: %d\n&quot;, i); }

int FUNCNAME;

void main(void) {  FUNCNAME = 1; FuncName(FUNCNAME); } Additional query words: 5.30 7.00 CVPACK

Keywords : kbcode kberrmsg kb16bitonly

Issue type :

Technology : kbAudDeveloper kbZNotKeyword3 kbLINKSearch kbLINK530DOS