The following table summarizes how Fortran, C/C++ and, for Windows, MASM handle procedure names. Note that for MASM, the table does not apply if the CASEMAP: ALL option is used.
Language |
Attributes |
Name Translated As |
Case of Name in .OBJ File |
---|---|---|---|
Fortran |
cDEC$ ATTRIBUTES C |
name (Linux* OS) _name (Windows* OS) _name (Mac OS* X) |
All lowercase |
Fortran (Windows OS) |
cDEC$ ATTRIBUTES STDCALL |
_name@n |
All lowercase |
Fortran |
default |
name_ (Linux OS) _name (Windows OS) _name_ (Mac OS X) |
All uppercase |
C |
cdecl (default) |
name (Linux OS) _name (Windows OS) _name (Mac OS X) |
Mixed case preserved |
C (Windows OS only) |
__stdcall |
_name@n |
Mixed case preserved |
C++ |
Default |
name@@decoration (Linux OS) _name@@decoration (Windows OS) __decorationnamedecoration (Mac OS X) |
Mixed case preserved |
Linux OS, Mac OS X Assembly |
Default |
name (Linux OS) _name (Mac OS X) |
Mixed case preserved |
MASM (Windows OS) |
C (in PROTO and PROC declarations) |
_name |
Mixed case preserved |
MASM (Windows OS) |
STDCALL (in PROTO and PROC declarations) |
_name@n |
Mixed case preserved |
In the preceding table:
The leading underscore (such as _name) is used on Windows operating systems based on IA-32 architecture only.
@n represents the stack space, in decimal notation, occupied by parameters on Windows operating systems based on IA-32 architecture only.
For example, assume a function is declared in C as:
extern int __stdcall Sum_Up( int a, int b, int c );
Each integer occupies 4 bytes, so the symbol name placed in the .OBJ file on systems based on IA-32 architecture is:
_Sum_Up@12
On systems based on Intel® 64 architecture, the symbol name placed in the .OBJ file is:
Sum_Up
Copyright © 1996-2010, Intel Corporation. All rights reserved.