1; RUN: llvm-as %s -o %t.o 2; RUN: llvm-as %p/Inputs/visibility.ll -o %t2.o 3 4; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \ 5; RUN: --plugin-opt=save-temps \ 6; RUN: -shared %t.o %t2.o -o %t.so 7; RUN: llvm-readobj -t %t.so | FileCheck %s 8; RUN: llvm-dis %t.so.bc -o - | FileCheck --check-prefix=IR %s 9 10; CHECK: Name: foo 11; CHECK-NEXT: Value: 12; CHECK-NEXT: Size: 13; CHECK-NEXT: Binding: Global 14; CHECK-NEXT: Type: Function 15; CHECK-NEXT: Other [ 16; CHECK-NEXT: STV_PROTECTED 17; CHECK-NEXT: ] 18 19; IR: define protected void @foo 20 21define weak protected void @foo() { 22 ret void 23} 24