1# REQUIRES: x86 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 6 7## Check the most constraining visibility attribute is propagated to the symbol tables. 8 9# CHECK: Symbol table '.dynsym' contains 3 entries: 10# CHECK: GLOBAL DEFAULT 6 default 11# CHECK-NEXT: GLOBAL PROTECTED 6 protected 12 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 19 20.global default 21default: 22 23.global protected 24protected: 25 26.global hidden 27hidden: 28 29.global internal 30internal: 31 32.global protected_with_hidden 33.protected 34protected_with_hidden: 35