Microsoft KB Archive/85506

{|
 * width="100%"|

Unreferenced Packaged Functions Appear in Map File

 * }

Q85506

-

The information in this article applies to:


 * Microsoft LINK for MS-DOS, versions 5.3x, 5.5, 5.6, 5.6.22, 5.6.339

-

SUMMARY
In Microsoft C/C++ version 7.0, the -Gy compiler option enables function-level linking by creating packaged functions. By default, Microsoft LINK uses the /PACKF[UNCTIONS] and does not include unreferenced packaged functions in the output file. However, these functions do appear in the map file.

This information was retained to provide information regarding which items were removed from the executable file.

MORE INFORMATION
The code example below illustrates this behavior. After building the source code and linking with LINK version 5.3, the map file contains the following information:

  Origin   Group 0148:0  DGROUP

Address        Publics by Name

...  0000:0C54       _fflush 0000:0000 Abs  _func              <== Constant (absolute) value 0000:144E      _main ... Linking the same source with LINK version 5.31.009 or later, the map file contains the following entry:

  Origin   Group 0148:0  DGROUP

Address        Publics by Name

...  0000:0C54       _fflush 0000:0000 Unr  _func              <== Unreferenced value 0000:144E      _main ...

Sample Code
/* * Compile options needed: /Gy */


 * 1) include 

void func(void) {  printf(&quot;Hello from func.\n&quot;); }

void main(void) {  printf(&quot;Hello from main.\n&quot;); } Additional query words: kbinf 5.30 5.31.009 5.50 5.60 5.60.220 5.60.339

Keywords : kb16bitonly

Issue type :

Technology : kbAudDeveloper kbZNotKeyword3 kbLINKSearch kbLINK530xDOSSearch kbLINK550DOS kbLINK560DOS