aboutsummaryrefslogtreecommitdiffstats
path: root/test/tools/gold/mtriple.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/tools/gold/mtriple.ll')
-rw-r--r--test/tools/gold/mtriple.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/tools/gold/mtriple.ll b/test/tools/gold/mtriple.ll
new file mode 100644
index 0000000..6395af6
--- /dev/null
+++ b/test/tools/gold/mtriple.ll
@@ -0,0 +1,13 @@
+; RUN: llvm-as %s -o %t.o
+; RUN: ld -plugin %llvmshlibdir/LLVMgold.so -m elf32ppc \
+; RUN: -plugin-opt=mtriple=powerpc-linux-gnu \
+; RUN: -plugin-opt=obj-path=%t3.o \
+; RUN: -shared %t.o -o %t2
+; RUN: llvm-readobj --file-headers %t2 | FileCheck --check-prefix=DSO %s
+; RUN: llvm-readobj --file-headers %t3.o | FileCheck --check-prefix=REL %s
+
+; REL: Type: Relocatable
+; REL-NEXT: Machine: EM_PPC
+
+; DSO: Type: SharedObject
+; DSO-NEXT: Machine: EM_PPC