Microsoft KB Archive/123874

= PRB: Section Names Truncated to Eight Characters When Linked =

Article ID: 123874

Article Last Modified on 11/18/2003

-

APPLIES TO

 The Linker (LINK.EXE), when used with:  Microsoft Visual C++ 2.0 Professional Edition

 Microsoft Visual C++ 4.0 Cross Development Edition for Macintosh 

-



This article was previously published under Q123874



SYMPTOMS
You can control the section names that the C/C++ compiler, version 9.0, generates by using the /ND or /NT compiler options, the code_seg pragma, or the data_seg pragma. However, the names generated by the compiler are truncated to eight-character names during linking with LINK version 2.5.



STATUS
This behavior is by design. Section names are limited to eight characters.



Steps to Reproduce Behavior
<ol>  Build the following sample code test.c  --

#pragma code_seg( "LongCodeSectionName" ) int i=7;

main {     exit(i); }

</li> Observe the long section name contained in the object file by executing this command:

link -dump -all test.obj > testobj.out

Then search the output file for LongCodeSectionName. The full name is in the object file.</li> Observe that LongCodeSectionName is truncated to LongCode in the executable file by executing this command:

link -dump - all test.exe > testexe.out

</li></ol>

Additional query words: 2.50 9.00

Keywords: kbprb KB123874

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.