]>
git.saurik.com Git - apple/objc4.git/blob - test/imports.c
2 Disallow some imports into and exports from libobjc.A.dylib.
4 To debug, re-run libobjc's link command with
5 -Xlinker -dead_strip -Xlinker -why_live -Xlinker SYMBOL_NAME_HERE
7 Disallowed imports (nm -u):
8 ___cxa_guard_acquire (C++ function-scope static initializer)
9 ___cxa_guard_release (C++ function-scope static initializer)
10 ___cxa_atexit (C++ static destructor)
11 weak external (any weak externals, including operators new and delete)
13 Disallowed exports (nm -U):
14 __Z* (any C++-mangled export)
15 weak external (any weak externals, including operators new and delete)
17 fixme rdar://13354718 should disallow anything from libc++ (i.e. not libc++abi)
22 echo $C{XCRUN} nm -m -arch $C{ARCH} $C{TESTLIB}
23 $C{XCRUN} nm -u -m -arch $C{ARCH} $C{TESTLIB} | egrep '(weak external| external (___cxa_atexit|___cxa_guard_acquire|___cxa_guard_release))' || true
24 $C{XCRUN} nm -U -m -arch $C{ARCH} $C{TESTLIB} | egrep '(weak external| external __Z)' || true
25 $C{COMPILE_C} $DIR/imports.c -o imports.exe