• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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%shlibext \
5; RUN:    -m elf_x86_64 \
6; RUN:    --plugin-opt=save-temps \
7; RUN:    -shared %t.o %t2.o -o %t.so
8; RUN: llvm-readobj -t %t.so | FileCheck %s
9; RUN: llvm-dis %t.so.0.2.internalize.bc -o - | FileCheck --check-prefix=IR %s
10
11; CHECK:      Name: foo
12; CHECK-NEXT: Value:
13; CHECK-NEXT: Size:
14; CHECK-NEXT: Binding: Global
15; CHECK-NEXT: Type: Function
16; CHECK-NEXT: Other [
17; CHECK-NEXT:   STV_PROTECTED
18; CHECK-NEXT: ]
19
20; IR: define dso_local void @foo
21
22target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
23target triple = "x86_64-unknown-linux-gnu"
24
25define weak protected void @foo() {
26  ret void
27}
28