使用VS2005 编译,enable /TP 编译选项(Compile as C++ Code) 和/FA 编译选项. 文中描述的全局变量为非静态全局变量
C++ 代码:
static int nsInitGlobal = 1;
static int nsUninitGlobal ;
int nInitGlobal = 1;
int nUninitGlobal ;
int _tmain (int argc , _TCHAR * argv [])
{
return 0;
}
ARM4 对应汇编代码:
EXPORT |?nUninitGlobal @@3HA| [ DATA ] ; nUninitGlobal
EXPORT |?nInitGlobal @@3HA| [ DATA ] ; nInitGlobal