1 # REQUIRES: x86-registered-target
3 ## This produces a static object that matches expectations for PS4/PS5.
4 # RUN: yaml2obj %s -DTYPE=ET_REL -DLABEL=Symbols -DZDAPV=_ZdaPv -o=%t1
5 # RUN: llvm-tli-checker --triple=x86_64-scei-ps4 %t1 | FileCheck %s
6 # RUN: llvm-tli-checker --triple=x86_64-sie-ps5 %t1 | FileCheck %s
8 ## This produces a dynamic object that has _ZdaPvj instead of _ZdaPv.
9 # RUN: yaml2obj %s -DTYPE=ET_DYN -DLABEL=DynamicSymbols -DZDAPV=_ZdaPvj -o=%t2
10 # RUN: llvm-tli-checker --triple x86_64-scei-ps4 %t2 | \
11 # RUN: FileCheck %s --check-prefixes=WRONG_SUMMARY,WRONG_DETAIL \
12 # RUN: --implicit-check-not="==" --implicit-check-not="<<" --implicit-check-not=">>"
14 ## --report=discrepancy is the default, check we get the same output.
15 # RUN: llvm-tli-checker --triple x86_64-scei-ps4 %t2 --report=discrepancy | \
16 # RUN: FileCheck %s --check-prefixes=WRONG_SUMMARY,WRONG_DETAIL \
17 # RUN: --implicit-check-not="==" --implicit-check-not="<<" --implicit-check-not=">>"
19 ## --report=summary should not print the details (checked by the
20 ## implicit-check-not strings).
21 # RUN: llvm-tli-checker --triple x86_64-scei-ps4 %t2 --report=summary | \
22 # RUN: FileCheck %s --check-prefix=WRONG_SUMMARY \
23 # RUN: --implicit-check-not="==" --implicit-check-not="<<" --implicit-check-not=">>"
25 ## --separate implies --report=summary.
26 # RUN: llvm-tli-checker --triple x86_64-scei-ps4 %t2 --separate | \
27 # RUN: FileCheck %s --check-prefix=WRONG_SUMMARY \
28 # RUN: --implicit-check-not="==" --implicit-check-not="<<" --implicit-check-not=">>"
30 ## Verify --dump-tli reports the full set.
31 # RUN: llvm-tli-checker --triple x86_64-scei-ps4 --dump-tli > %t3.txt
32 # RUN: FileCheck %s --check-prefix=AVAIL --input-file %t3.txt
33 # RUN: FileCheck %s --check-prefix=UNAVAIL --input-file %t3.txt
35 # CHECK: << Total TLI yes SDK no: 8
36 # CHECK: >> Total TLI no SDK yes: 0
37 # CHECK: == Total TLI yes SDK yes: 235
39 # WRONG_DETAIL: << TLI yes SDK no : '_ZdaPv' aka operator delete[](void*)
40 # WRONG_DETAIL: >> TLI no SDK yes: '_ZdaPvj' aka operator delete[](void*, unsigned int)
41 # WRONG_DETAIL-COUNT-8: << TLI yes SDK no : {{.*}}__hot_cold_t
42 # WRONG_SUMMARY: << Total TLI yes SDK no: 9{{$}}
43 # WRONG_SUMMARY: >> Total TLI no SDK yes: 1{{$}}
44 # WRONG_SUMMARY: == Total TLI yes SDK yes: 234
46 ## The -COUNT suffix doesn't care if there are too many matches, so check
47 ## the exact count first; the two directives should add up to that.
48 ## Yes, this means additions to TLI will fail this test, but the argument
49 ## to -COUNT can't be an expression.
50 # AVAIL: TLI knows 476 symbols, 243 available
51 # AVAIL-COUNT-243: {{^}} available
52 # AVAIL-NOT: {{^}} available
53 # UNAVAIL-COUNT-233: not available
54 # UNAVAIL-NOT: not available
56 ## This is a large file so it's worth telling lit to stop here.
63 OSABI: ELFOSABI_FREEBSD
70 # This is an undefined symbol that is known to TLI but not in the
71 # available set for PS4, showing the tool will ignore undefined symbols.
72 # Omitting the Section attribute makes it undefined.
76 # This will be either _ZdaPv or _ZdaPvj (see yaml2obj invocations above).
81 # The rest of these are the remaining symbols needed for PS4.
82 - Name: _ZdaPvRKSt9nothrow_t
86 - Name: _ZdaPvSt11align_val_t
90 - Name: _ZdaPvSt11align_val_tRKSt9nothrow_t
98 - Name: _ZdaPvmSt11align_val_t
106 - Name: _ZdlPvRKSt9nothrow_t
110 - Name: _ZdlPvSt11align_val_t
114 - Name: _ZdlPvSt11align_val_tRKSt9nothrow_t
122 - Name: _ZdlPvmSt11align_val_t
130 - Name: _ZnamRKSt9nothrow_t
134 - Name: _ZnamSt11align_val_t
138 - Name: _ZnamSt11align_val_tRKSt9nothrow_t
146 - Name: _ZnwmRKSt9nothrow_t
150 - Name: _ZnwmSt11align_val_t
154 - Name: _ZnwmSt11align_val_tRKSt9nothrow_t
162 - Name: __cxa_guard_abort
166 - Name: __cxa_guard_acquire
170 - Name: __cxa_guard_release
202 - Name: aligned_alloc
694 - Name: posix_memalign