]>
git.saurik.com Git - apple/security.git/blob - symbol_strip.sh
5 echo "Export file name required."
9 expbase
=`basename $expfile`
11 # Don't rerun this unless the file has been relinked
12 if [ "${BUILT_PRODUCTS_DIR}/${expbase}.timestamp" -nt "${BUILT_PRODUCTS_DIR}/${INNER_PRODUCT_SUBPATH}" ]; then
13 echo "${BUILT_PRODUCTS_DIR}/${INNER_PRODUCT_SUBPATH} is up to date."
17 echo "Scanning ${BUILT_PRODUCTS_DIR}/${INNER_PRODUCT_SUBPATH}"
18 ARCHS
=`lipo -info "${BUILT_PRODUCTS_DIR}/${INNER_PRODUCT_SUBPATH}" | awk -F : '{print $3}'`
21 echo "Generating exports file ${BUILT_PRODUCTS_DIR}/${expbase}_$arch"
22 nm
-gp -arch $arch "${BUILT_PRODUCTS_DIR}/${INNER_PRODUCT_SUBPATH}" \
23 | egrep -v '^/| U _' \
25 | egrep '_(|tf|ti|C)(|Q[2-9])8Security|_(N|ZN|ZNK|ZTTN|ZTVN)8Security|^_(Sec|CSSM|Authorization)' \
27 | sort -u > "${BUILT_PRODUCTS_DIR}/${expbase}_$arch"
28 echo nmedit
-s "${BUILT_PRODUCTS_DIR}/${expbase}_$arch" -arch $arch "${BUILT_PRODUCTS_DIR}/${INNER_PRODUCT_SUBPATH}"
29 nmedit
-s "${BUILT_PRODUCTS_DIR}/${expbase}_$arch" -arch $arch "${BUILT_PRODUCTS_DIR}/${INNER_PRODUCT_SUBPATH}"
31 touch "${BUILT_PRODUCTS_DIR}/${expbase}.timestamp"