[PATCH] D29194: [lld][mips] Correct tests for mips64 implying PIC.

Simon Dardis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 27 03:12:28 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL293275: [lld][mips] Correct tests for mips64 implying PIC. (authored by sdardis).

Changed prior to commit:
  https://reviews.llvm.org/D29194?vs=85947&id=86037#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D29194

Files:
  lld/trunk/test/ELF/emulation.s
  lld/trunk/test/ELF/mips-elf-flags-err.s
  lld/trunk/test/ELF/mips-elf-flags.s


Index: lld/trunk/test/ELF/mips-elf-flags-err.s
===================================================================
--- lld/trunk/test/ELF/mips-elf-flags-err.s
+++ lld/trunk/test/ELF/mips-elf-flags-err.s
@@ -20,7 +20,7 @@
 # RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux \
 # RUN:         -mcpu=mips64r6 %S/Inputs/mips-dynamic.s -o %t1.o
 # RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux \
-# RUN:         -mcpu=octeon %s -o %t2.o
+# RUN:         -position-independent -mcpu=octeon %s -o %t2.o
 # RUN: not ld.lld %t1.o %t2.o -o %t.exe 2>&1 \
 # RUN:   | FileCheck -check-prefix=R6OCTEON %s
 
@@ -35,9 +35,9 @@
 # Check that lld take in account EF_MIPS_MACH_XXX ISA flags
 
 # RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux \
-# RUN:         -mcpu=mips64 %S/Inputs/mips-dynamic.s -o %t1.o
+# RUN:         -position-independent -mcpu=mips64 %S/Inputs/mips-dynamic.s -o %t1.o
 # RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux \
-# RUN:         -mcpu=octeon %s -o %t2.o
+# RUN:         -position-independent -mcpu=octeon %s -o %t2.o
 # RUN: ld.lld %t1.o %t2.o -o %t.exe
 # RUN: llvm-readobj -h %t.exe | FileCheck -check-prefix=OCTEON %s
 
@@ -79,8 +79,7 @@
 # OCTEON-NEXT:   EF_MIPS_ARCH_64R2
 # OCTEON-NEXT:   EF_MIPS_CPIC
 # OCTEON-NEXT:   EF_MIPS_MACH_OCTEON
-# OCTEON-NEXT:   EF_MIPS_PIC
-# OCTEON-NEXT: ]
+# OCTEON:      ]
 
 # N32O32: error: {{.*}}mips-elf-flags-err.s.tmp2.o is incompatible with {{.*}}mips-elf-flags-err.s.tmp1.o
 
Index: lld/trunk/test/ELF/emulation.s
===================================================================
--- lld/trunk/test/ELF/emulation.s
+++ lld/trunk/test/ELF/emulation.s
@@ -274,7 +274,8 @@
 # MIPSEL-NEXT:     EF_MIPS_CPIC
 # MIPSEL-NEXT:   ]
 
-# RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux %s -o %tmips64
+# RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux -position-independent \
+# RUN:         %s -o %tmips64
 # RUN: ld.lld -m elf64btsmip -e _start %tmips64 -o %t2mips64
 # RUN: llvm-readobj -file-headers %t2mips64 | FileCheck --check-prefix=MIPS64 %s
 # RUN: ld.lld %tmips64 -e _start -o %t3mips64
@@ -301,7 +302,8 @@
 # MIPS64-NEXT:     EF_MIPS_PIC
 # MIPS64-NEXT:   ]
 
-# RUN: llvm-mc -filetype=obj -triple=mips64el-unknown-linux %s -o %tmips64el
+# RUN: llvm-mc -filetype=obj -triple=mips64el-unknown-linux \
+# RUN:         -position-independent %s -o %tmips64el
 # RUN: ld.lld -m elf64ltsmip -e _start %tmips64el -o %t2mips64el
 # RUN: llvm-readobj -file-headers %t2mips64el | FileCheck --check-prefix=MIPS64EL %s
 # RUN: ld.lld %tmips64el -e _start -o %t3mips64el
Index: lld/trunk/test/ELF/mips-elf-flags.s
===================================================================
--- lld/trunk/test/ELF/mips-elf-flags.s
+++ lld/trunk/test/ELF/mips-elf-flags.s
@@ -30,7 +30,7 @@
 # RUN:   | FileCheck -check-prefix=EXE-R6 %s
 
 # RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux \
-# RUN:         -mcpu=octeon %s -o %t.o
+# RUN:         -position-independent -mcpu=octeon %s -o %t.o
 # RUN: ld.lld %t.o -o %t.exe
 # RUN: llvm-readobj -h -mips-abi-flags %t.exe \
 # RUN:   | FileCheck -check-prefix=OCTEON %s


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29194.86037.patch
Type: text/x-patch
Size: 3119 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170127/bba8b2fd/attachment.bin>


More information about the llvm-commits mailing list