]>
Commit | Line | Data |
---|---|---|
a61fdf0a | 1 | ## |
55e3d2f6 | 2 | # Copyright (c) 2007-2008 Apple Inc. All rights reserved. |
a61fdf0a A |
3 | # |
4 | # @APPLE_LICENSE_HEADER_START@ | |
5 | # | |
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 | |
11 | # file. | |
12 | # | |
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. | |
20 | # | |
21 | # @APPLE_LICENSE_HEADER_END@ | |
22 | ## | |
23 | TESTROOT = ../.. | |
24 | include ${TESTROOT}/include/common.makefile | |
25 | ||
26 | # | |
27 | # Tests the use of wildcards in exported symbol lists | |
28 | # | |
29 | ||
30 | run: all | |
31 | ||
32 | all: | |
2f2f92e4 | 33 | ${CC} ${CCFLAGS} -dynamiclib foo.c -o libfoo.dylib -Wl,-exported_symbol -Wl,'_foo*bar' |
e456bf10 | 34 | nm -j -g libfoo.dylib -s __TEXT __text | diff - expect1 | ${FAIL_IF_STDIN} |
a61fdf0a A |
35 | ${FAIL_IF_BAD_MACHO} libfoo.dylib |
36 | ||
2f2f92e4 | 37 | ${CC} ${CCFLAGS} -dynamiclib foo.c -o libfoo.dylib -Wl,-exported_symbol -Wl,'_f?o' |
e456bf10 | 38 | nm -j -g libfoo.dylib -s __TEXT __text | diff - expect2 | ${FAIL_IF_STDIN} |
a61fdf0a A |
39 | ${FAIL_IF_BAD_MACHO} libfoo.dylib |
40 | ||
2f2f92e4 | 41 | ${CC} ${CCFLAGS} -dynamiclib foo.c -o libfoo.dylib -Wl,-exported_symbol -Wl,'_foo*' |
e456bf10 | 42 | nm -j -g libfoo.dylib -s __TEXT __text | diff - expect3 | ${FAIL_IF_STDIN} |
a61fdf0a A |
43 | ${FAIL_IF_BAD_MACHO} libfoo.dylib |
44 | ||
2f2f92e4 | 45 | ${CC} ${CCFLAGS} -dynamiclib foo.c -o libfoo.dylib -Wl,-exported_symbol -Wl,'_f*o*' |
e456bf10 | 46 | nm -j -g libfoo.dylib -s __TEXT __text | diff - expect4 | ${FAIL_IF_STDIN} |
a61fdf0a A |
47 | ${FAIL_IF_BAD_MACHO} libfoo.dylib |
48 | ||
2f2f92e4 | 49 | ${CC} ${CCFLAGS} -dynamiclib foo.c -o libfoo.dylib -Wl,-exported_symbol -Wl,_foo -Wl,-exported_symbol -Wl,'_*bar' |
e456bf10 | 50 | nm -j -g libfoo.dylib -s __TEXT __text | diff - expect5 | ${FAIL_IF_STDIN} |
a61fdf0a A |
51 | ${FAIL_IF_BAD_MACHO} libfoo.dylib |
52 | ||
2f2f92e4 | 53 | ${CC} ${CCFLAGS} -dynamiclib foo.c -o libfoo.dylib -exported_symbols_list list5 |
e456bf10 | 54 | nm -j -g libfoo.dylib -s __TEXT __text | diff - expect5 | ${FAIL_IF_STDIN} |
a61fdf0a A |
55 | ${FAIL_IF_BAD_MACHO} libfoo.dylib |
56 | ||
2f2f92e4 | 57 | ${CC} ${CCFLAGS} -dynamiclib foo.c -o libfoo.dylib -Wl,-unexported_symbol -Wl,'_*2*' |
e456bf10 | 58 | nm -j -g libfoo.dylib -s __TEXT __text | diff - expect6 | ${FAIL_IF_STDIN} |
a61fdf0a A |
59 | ${FAIL_IF_BAD_MACHO} libfoo.dylib |
60 | ||
2f2f92e4 | 61 | ${CC} ${CCFLAGS} -dynamiclib foo.c -o libfoo.dylib -Wl,-exported_symbol -Wl,'_f[abcdef]o' |
e456bf10 | 62 | nm -j -g libfoo.dylib -s __TEXT __text | diff - expect7 | ${FAIL_IF_STDIN} |
a61fdf0a A |
63 | ${FAIL_IF_BAD_MACHO} libfoo.dylib |
64 | ||
2f2f92e4 | 65 | ${CC} ${CCFLAGS} -dynamiclib foo.c -o libfoo.dylib -Wl,-exported_symbol -Wl,'_f[a-f]o' |
e456bf10 | 66 | nm -j -g libfoo.dylib -s __TEXT __text | diff - expect7 | ${FAIL_IF_STDIN} |
a61fdf0a A |
67 | ${FAIL_IF_BAD_MACHO} libfoo.dylib |
68 | ||
2f2f92e4 | 69 | ${CC} ${CCFLAGS} -dynamiclib foo.c -o libfoo.dylib -Wl,-exported_symbol -Wl,'_f[a-z]o' |
e456bf10 | 70 | nm -j -g libfoo.dylib -s __TEXT __text | diff - expect8 | ${FAIL_IF_STDIN} |
a61fdf0a A |
71 | ${FAIL_IF_BAD_MACHO} libfoo.dylib |
72 | ||
2f2f92e4 | 73 | ${CC} ${CCFLAGS} -dynamiclib foo.c -o libfoo.dylib -Wl,-exported_symbol -Wl,'_f[a-fnop]o' |
e456bf10 | 74 | nm -j -g libfoo.dylib -s __TEXT __text | diff - expect8 | ${FAIL_IF_STDIN} |
a61fdf0a A |
75 | ${PASS_IFF_GOOD_MACHO} libfoo.dylib |
76 | ||
77 | clean: | |
78 | rm libfoo.dylib |