]>
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)
14 weak external ____chkstk_darwin (from libSystem)
16 Disallowed exports (nm -U):
17 __Z* (any C++-mangled export)
18 weak external (any weak externals, including operators new and delete)
20 fixme rdar://13354718 should disallow anything from libc++ (i.e. not libc++abi)
25 echo $C{XCRUN} nm -m -arch $C{ARCH} $C{TESTLIB}
26 $C{XCRUN} nm -u -m -arch $C{ARCH} $C{TESTLIB} | grep -v 'weak external ____chkstk_darwin \(from libSystem\)' | egrep '(weak external| external (___cxa_atexit|___cxa_guard_acquire|___cxa_guard_release))' || true
27 $C{XCRUN} nm -U -m -arch $C{ARCH} $C{TESTLIB} | egrep '(weak external| external __Z)' || true
28 $C{COMPILE_C} $DIR/imports.c -o imports.exe