1 # Show that llvm-readobj prints the symbol visibility where recognised, or
2 # something sensible when not, for both GNU and LLVM output.
4 # Use --dyn-symbols because it is only possible to hand-craft symbols with
5 # non-standard st_other values for .dynsym.
6 # RUN: yaml2obj %s > %t
7 # RUN: llvm-readobj --symbols --dyn-symbols %t | FileCheck %s --check-prefix=LLVM
8 # RUN: llvm-readelf --symbols --dyn-symbols %t | FileCheck %s --check-prefix=GNU
12 # LLVM: Name: internal
14 # LLVM-NEXT: STV_INTERNAL (0x1)
18 # LLVM-NEXT: STV_HIDDEN (0x2)
20 # LLVM: Name: protected
22 # LLVM-NEXT: STV_PROTECTED (0x3)
28 # FIXME - the "other" symbol should print something indicating its non-zero st_other value.
29 # See https://bugs.llvm.org/show_bug.cgi?id=40785.
30 # GNU: DEFAULT {{.*}} other
31 # GNU: DEFAULT {{.*}} default
32 # GNU-NEXT: INTERNAL {{.*}} internal
33 # GNU-NEXT: HIDDEN {{.*}} hidden
34 # GNU-NEXT: PROTECTED {{.*}} protected
46 Content: "006f7468657200"
52 # Symbol with st_name = 1, st_other = 0x4
53 Content: "0000000000000000000000000000000001000000000000000000000000040000"
56 Visibility: STV_DEFAULT
59 Visibility: STV_INTERNAL
62 Visibility: STV_HIDDEN
65 Visibility: STV_PROTECTED