summaryrefslogtreecommitdiff
path: root/test/ELF/lto/Inputs/relocation-model-pic.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/ELF/lto/Inputs/relocation-model-pic.ll')
-rw-r--r--test/ELF/lto/Inputs/relocation-model-pic.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ELF/lto/Inputs/relocation-model-pic.ll b/test/ELF/lto/Inputs/relocation-model-pic.ll
new file mode 100644
index 0000000000000..e76605435e875
--- /dev/null
+++ b/test/ELF/lto/Inputs/relocation-model-pic.ll
@@ -0,0 +1,11 @@
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+@foo = external global i32
+define i32 @main() {
+ %t = load i32, i32* @foo
+ ret i32 %t
+}
+
+!llvm.module.flags = !{!0}
+!0 = !{i32 1, !"PIC Level", i32 2}