Undefined symbols for architecture i386: "EH_frame0",

linking this IR file: http://pastebin.com/HnUsSshB

with triple i386-apple-ios to an .o file

and linking it using:

ld -arch i386 -ObjC "EmptyProject17.o" -lSystem -lobjc -framework CoreGraphics -framework Foundation -framework UIKit -dynamic -o "i386-EmptyProject17" -objc_abi_version 2 -no_implicit_dylibs -lcrt1.o -syslibroot "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk" -force_load "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a" -demangle -ios_simulator_version_min 5.0

I get this error:
Undefined symbols for architecture i386:
   "EH_frame0", referenced from:
_main in EmptyProject17

what am i missing here?
The asm for this http://pastebin.com/KCSWSDBm doesn't contain EH_frame0 but i heard it that those are the ".cfi*" opcodes. I don't understand why it fails on not finding EH_frame0 because it's defined by this object itself.

thanks,

Carlo Kok

Op 21-11-2012 22:18, Carlo Kok schreef:

linking this IR file: http://pastebin.com/HnUsSshB

with triple i386-apple-ios to an .o file

and linking it using:

ld -arch i386 -ObjC "EmptyProject17.o" -lSystem -lobjc -framework
CoreGraphics -framework Foundation -framework UIKit -dynamic -o
"i386-EmptyProject17" -objc_abi_version 2 -no_implicit_dylibs -lcrt1.o
-syslibroot
"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk"
-force_load
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a"
-demangle -ios_simulator_version_min 5.0

I get this error:
Undefined symbols for architecture i386:
   "EH_frame0", referenced from:
_main in EmptyProject17

what am i missing here?

This ended up being line 16:
@"\01L_OBJC_PROTO_REF_$_0_IIntf"

if that gets renamed to:
@"\01l_OBJC_PROTO_REF_$_0_IIntf"

It all works fine.