2 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
3 # RUN: llvm-mc -filetype=obj -triple=x86_64 %p/Inputs/visibility.s -o %t2.o
4 # RUN: ld.lld -shared %t.o %t2.o -o %t.so
5 # RUN: llvm-readelf -s %t.so | FileCheck %s
7 ## Check the most constraining visibility attribute is propagated to the symbol tables.
9 # CHECK: Symbol table '.dynsym' contains 3 entries:
10 # CHECK: GLOBAL DEFAULT 6 default
11 # CHECK-NEXT: GLOBAL PROTECTED 6 protected
13 # CHECK: Symbol table '.symtab' contains 7 entries:
14 # CHECK: LOCAL HIDDEN 6 hidden
15 # CHECK-NEXT: LOCAL INTERNAL 6 internal
16 # CHECK-NEXT: LOCAL HIDDEN 6 protected_with_hidden
17 # CHECK: GLOBAL DEFAULT 6 default
18 # CHECK-NEXT: GLOBAL PROTECTED 6 protected
32 .global protected_with_hidden
34 protected_with_hidden
: