1 ; RUN: llvm-as %s -o %t.o
5 ; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \
7 ; RUN: --plugin-opt=save-temps %t.o -o %t-out
8 ; RUN: llvm-readobj -r %t-out.lto.o | FileCheck %s --check-prefix=PIC
10 ; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \
11 ; RUN: --export-dynamic --noinhibit-exec -pie \
12 ; RUN: --plugin-opt=save-temps %t.o -o %t-out
13 ; RUN: llvm-readobj -r %t-out.lto.o | FileCheck %s --check-prefix=PIC
17 ; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \
19 ; RUN: --plugin-opt=save-temps %t.o -o %t-out
20 ; RUN: llvm-readobj -r %t-out.lto.o | FileCheck %s --check-prefix=PIC
22 ; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \
23 ; RUN: --export-dynamic --noinhibit-exec -pie \
24 ; RUN: --plugin-opt=save-temps %t.o -o %t-out
25 ; RUN: llvm-readobj -r %t-out.lto.o | FileCheck %s --check-prefix=PIC
27 ; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \
29 ; RUN: --plugin-opt=save-temps %t.o -o %t-out
30 ; RUN: llvm-readobj -r %t-out.lto.o | FileCheck %s --check-prefix=PIC
33 ; PIC: R_X86_64_GOTPCREL foo
35 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
36 target triple = "x86_64-unknown-linux-gnu"
38 @foo = external global i32
40 %t = load i32, ptr @foo
44 !llvm.module.flags = !{!0}
45 !0 = !{i32 1, !"PIC Level", i32 2}