]> git.saurik.com Git - apple/objc4.git/blob - test/unload3.c
objc4-680.tar.gz
[apple/objc4.git] / test / unload3.c
1 // unload3: contains imageinfo but no other objc metadata
2 // libobjc must not keep it open
3 // DO NOT USE __OBJC2__; this is a C file.
4
5 #include <TargetConditionals.h>
6
7 #if TARGET_OS_WIN32 || (TARGET_OS_MAC && TARGET_CPU_X86 && !TARGET_IPHONE_SIMULATOR)
8 // old ABI
9 int fake[2] __attribute__((section("__OBJC,__image_info")))
10 #else
11 // new ABI
12 int fake[2] __attribute__((section("__DATA,__objc_imageinfo")))
13 #endif
14 = { 0, TARGET_IPHONE_SIMULATOR ? (1<<5) : 0 };
15
16 // silence "no debug symbols in executable" warning
17 void fn(void) { }