2 # Copyright (c) 2005 Apple Computer, Inc. All rights reserved.
4 # @APPLE_LICENSE_HEADER_START@
6 # This file contains Original Code and/or Modifications of Original Code
7 # as defined in and that are subject to the Apple Public Source License
8 # Version 2.0 (the 'License'). You may not use this file except in
9 # compliance with the License. Please obtain a copy of the License at
10 # http://www.opensource.apple.com/apsl/ and read it before using this
13 # The Original Code and all software distributed under the License are
14 # distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 # EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 # INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 # FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 # Please see the License for the specific language governing rights and
19 # limitations under the License.
21 # @APPLE_LICENSE_HEADER_END@
24 include ${TESTROOT}/include/common.makefile
26 # Test strip: symbols referenced by indirect symbol table entries that can'tÊ
28 # __ZN9__gnu_cxx13new_allocatorIiE7destroyEPi
29 # __ZNKSt12_Vector_baseIiSaIiEE13get_allocatorEv
30 # __ZN9__gnu_cxx13new_allocatorIiEC2ERKS1_
31 # __ZNSt12_Vector_baseIiSaIiEE13_M_deallocateEPim
32 # __ZN9__gnu_cxx13new_allocatorIiED2Ev
33 # __ZNSt6vectorIiSaIiEEC1ERKS0_
35 # __ZN9__gnu_cxx13new_allocatorIiE10deallocateEPim
36 # __ZNSt12_Vector_baseIiSaIiEE12_Vector_implC1ERKS0_
38 # __ZNSt12_Vector_baseIiSaIiEED2Ev
40 # __ZNSt12_Vector_baseIiSaIiEEC2ERKS0_
41 # __ZNSt6vectorIiSaIiEED1Ev
43 # __ZSt8_DestroyIPiSaIiEEvT_S2_T0_
44 # __ZN9__gnu_cxx13new_allocatorIiEC2Ev
46 # __ZNSt12_Vector_baseIiSaIiEE12_Vector_implD1Ev
53 $(CXX) main.cxx -arch ${ARCH} -o main
54 ${FAIL_IF_BAD_MACHO} main
55 ${FAIL_IF_ERROR} nm -j main >main-no-strip.nm
56 $(CXX) main.cxx -arch ${ARCH} -o main
57 ${FAIL_IF_BAD_MACHO} main
59 # Make sure there are no symbols in the stripped file that aren't
61 nm -j main | comm -23 - main-no-strip.nm | ${FAIL_IF_STDIN}
63 # Now make sure that all the __Z symbols exist
64 strip_cnt=`nm -j main | comm -12 - main-no-strip.nm | grep -c __Z`; \
65 nostrip_cnt=`nm -j main|grep -c __Z`; \
66 [ x"$$strip_cnt" = x"$$nostrip_cnt" ]
67 @echo PASS $$UNIT_TEST_NAME
70 rm -rf *.o main-* main