1 ## Show that llvm-readobj prints the symbol visibility where recognised, or
2 ## something sensible when not, for both GNU and LLVM output.
4 ## Check how we dump symbols when they have only STV_* bits set for st_other.
5 ## (This is the most common case).
7 # RUN: yaml2obj --docnum=1 %s > %t1.o
8 # RUN: llvm-readobj --symbols %t1.o | FileCheck %s --check-prefix=LLVM
9 # RUN: llvm-readelf --symbols %t1.o | FileCheck %s --strict-whitespace --check-prefix=GNU
13 # LLVM: Name: internal
15 # LLVM-NEXT: STV_INTERNAL (0x1)
19 # LLVM-NEXT: STV_HIDDEN (0x2)
21 # LLVM: Name: protected
23 # LLVM-NEXT: STV_PROTECTED (0x3)
27 # GNU-NEXT: DEFAULT UND
28 # GNU-NEXT: DEFAULT UND default
29 # GNU-NEXT: INTERNAL UND internal
30 # GNU-NEXT: HIDDEN UND hidden
31 # GNU-NEXT: PROTECTED UND protected
41 Other: [ STV_DEFAULT ]
44 Other: [ STV_INTERNAL ]
50 Other: [ STV_PROTECTED ]
53 ## Check the output when we have non-visibility bits set for at least one of the symbols.
55 # RUN: yaml2obj --docnum=2 %s > %t2.o
56 # RUN: llvm-readobj --symbols %t2.o | FileCheck %s --check-prefixes=LLVM,LLVM-OTHER
57 # RUN: llvm-readelf --symbols %t2.o | FileCheck %s --strict-whitespace --check-prefix=GNU-OTHER
59 # LLVM-OTHER: Name: other
60 # LLVM-OTHER: Other [ (0x4)
63 # GNU-OTHER: Vis Ndx Name
64 # GNU-OTHER-NEXT: DEFAULT UND
65 # GNU-OTHER-NEXT: DEFAULT UND default
66 # GNU-OTHER-NEXT: INTERNAL UND internal
67 # GNU-OTHER-NEXT: HIDDEN UND hidden
68 # GNU-OTHER-NEXT: PROTECTED UND protected
69 # GNU-OTHER-NEXT: DEFAULT [<other: 0x4>] UND other
79 Other: [ STV_DEFAULT ]
81 Other: [ STV_INTERNAL ]
85 Other: [ STV_PROTECTED ]