我尝试根据Jonathan Zdziarski的书《Hacking and Securing iOS Applications》中的示例构建一个包含许多对象文件的示例。但是,在使用以下命令编译二进制文件时:
export PLATFORM=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
$PLATFORM/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 -o launchd launchd.o syscalls.o -static -nostartfiles -nodefaultlibs -nostdlib -W1,-e,_main
终端显示如下:
Undefined symbols for architecture armv7:
"start", referenced from:
-u command line option
ld: symbol(s) not found for architecture armv7
collect2: ld returned 1 exit status
通常来说,当缺少库文件时就会出现这个消息,但是我该怎么找出哪一个库文件呢?我非常确定源代码没有问题。