brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 358751b Raw
46 lines · plain
1; RUN: llvm-as %s -o %t.o2 3;; Non-PIC source.4 5; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \6; RUN:    --shared \7; RUN:    --plugin-opt=save-temps %t.o -o %t-out8; RUN: llvm-readobj -r %t-out.lto.o | FileCheck %s --check-prefix=PIC9 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-out13; RUN: llvm-readobj -r %t-out.lto.o | FileCheck %s --check-prefix=PIC14 15;; PIC source.16 17; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \18; RUN:    --shared \19; RUN:    --plugin-opt=save-temps %t.o -o %t-out20; RUN: llvm-readobj -r %t-out.lto.o | FileCheck %s --check-prefix=PIC21 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-out25; RUN: llvm-readobj -r %t-out.lto.o | FileCheck %s --check-prefix=PIC26 27; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \28; RUN:    -r \29; RUN:    --plugin-opt=save-temps %t.o -o %t-out30; RUN: llvm-readobj -r %t-out.lto.o | FileCheck %s --check-prefix=PIC31 32 33; PIC: R_X86_64_GOTPCREL foo34 35target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"36target triple = "x86_64-unknown-linux-gnu"37 38@foo = external global i3239define i32 @main() {40  %t = load i32, ptr @foo41  ret i32 %t42}43 44!llvm.module.flags = !{!0}45!0 = !{i32 1, !"PIC Level", i32 2}46