【发布时间】:2010-11-27 01:58:39
【问题描述】:
为了弄清楚我的交叉编译的 mingw32 程序中的 malloc() 是否是线程安全的,我在二进制文件上运行了 nm。结果:
$ i386-mingw32-nm myfile.exe | grep malloc
00ab04fc I __imp__malloc
005b8e70 T _malloc
$
为了比较,这里搜索GetLastError,在我的程序中使用但没有定义:
$ i386-mingw32-nm myfile.exe | grep GetLastError
005b9034 T _GetLastError@0
00ab0370 I __imp__GetLastError@0
$
这里是我所知道的在我的程序中的搜索:
$ i386-mingw32-nm myfile.exe | grep ends_with
0040a98d T _ends_with
$
我认为这意味着我的 C 库中的 malloc() 是作为系统 malloc() 的掩护提供的,GetLastError() 也是如此,但 ends_with() 没有出现在系统中。但我想要第二个意见。
谢谢!
【问题讨论】: