[lld] r282715 - [ELF][MIPS] Do not use a binary input file in the test case. NFC
Simon Atanasyan via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 29 05:58:43 PDT 2016
Author: atanasyan
Date: Thu Sep 29 07:58:42 2016
New Revision: 282715
URL: http://llvm.org/viewvc/llvm-project?rev=282715&view=rev
Log:
[ELF][MIPS] Do not use a binary input file in the test case. NFC
Added:
lld/trunk/test/ELF/Inputs/mips-fnpic.s
lld/trunk/test/ELF/Inputs/mips-fpic.s
Removed:
lld/trunk/test/ELF/Inputs/mips-sto-pic.o
Modified:
lld/trunk/test/ELF/mips-npic-call-pic.s
Added: lld/trunk/test/ELF/Inputs/mips-fnpic.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Inputs/mips-fnpic.s?rev=282715&view=auto
==============================================================================
--- lld/trunk/test/ELF/Inputs/mips-fnpic.s (added)
+++ lld/trunk/test/ELF/Inputs/mips-fnpic.s Thu Sep 29 07:58:42 2016
@@ -0,0 +1,6 @@
+ .option pic0
+ .text
+ .global fnpic
+ .type fnpic, @function
+fnpic:
+ nop
Added: lld/trunk/test/ELF/Inputs/mips-fpic.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Inputs/mips-fpic.s?rev=282715&view=auto
==============================================================================
--- lld/trunk/test/ELF/Inputs/mips-fpic.s (added)
+++ lld/trunk/test/ELF/Inputs/mips-fpic.s Thu Sep 29 07:58:42 2016
@@ -0,0 +1,6 @@
+ .option pic2
+ .text
+ .global fpic
+ .type fpic, @function
+fpic:
+ nop
Removed: lld/trunk/test/ELF/Inputs/mips-sto-pic.o
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Inputs/mips-sto-pic.o?rev=282714&view=auto
==============================================================================
Binary files lld/trunk/test/ELF/Inputs/mips-sto-pic.o (original) and lld/trunk/test/ELF/Inputs/mips-sto-pic.o (removed) differ
Modified: lld/trunk/test/ELF/mips-npic-call-pic.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mips-npic-call-pic.s?rev=282715&r1=282714&r2=282715&view=diff
==============================================================================
--- lld/trunk/test/ELF/mips-npic-call-pic.s (original)
+++ lld/trunk/test/ELF/mips-npic-call-pic.s Thu Sep 29 07:58:42 2016
@@ -3,9 +3,14 @@
# non-PIC code calls PIC function.
# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
+# RUN: %p/Inputs/mips-fpic.s -o %t-fpic.o
+# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
+# RUN: %p/Inputs/mips-fnpic.s -o %t-fnpic.o
+# RUN: ld.lld -r %t-fpic.o %t-fnpic.o -o %t-sto-pic.o
+# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
# RUN: %p/Inputs/mips-pic.s -o %t-pic.o
# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t-npic.o
-# RUN: ld.lld %t-npic.o %t-pic.o %p/Inputs/mips-sto-pic.o -o %t.exe
+# RUN: ld.lld %t-npic.o %t-pic.o %t-sto-pic.o -o %t.exe
# RUN: llvm-objdump -d %t.exe | FileCheck %s
# CHECK: Disassembly of section .text:
@@ -22,7 +27,7 @@
# CHECK-NEXT: 20018: 0c 00 80 19 jal 131172 <foo2+0x4>
# ^-- .pic.foo2
# CHECK-NEXT: 2001c: 00 00 00 00 nop
-# CHECK-NEXT: 20020: 0c 00 80 28 jal 131232 <fnpic+0x10>
+# CHECK-NEXT: 20020: 0c 00 80 25 jal 131220 <fnpic+0x4>
# ^-- .pic.fpic
# CHECK-NEXT: 20024: 00 00 00 00 nop
# CHECK-NEXT: 20028: 0c 00 80 24 jal 131216 <fnpic>
@@ -56,20 +61,19 @@
# CHECK-NEXT: 20078: 00 00 00 00 nop
# CHECK-NEXT: 2007c: 00 00 00 00 nop
#
-#CHECK: fpic:
-#CHECK-NEXT: 20080: 00 00 00 00 00 00 00 00 ........
-#CHECK-NEXT: 20088: 00 00 00 00 00 00 00 00
-
-#CHECK: fnpic:
-#CHECK-NEXT: 20090: 00 00 00 00 00 00 00 00 ........
-#CHECK-NEXT: 20098: 00 00 00 00 00 00 00 00 ........
-#CHECK-NEXT: 200a0: 3c 19 00 02 08 00 80 20 <......
-#CHECK-NEXT: 200a8: 27 39 00 80 00 00 00 00
+# CHECK: fpic:
+# CHECK-NEXT: 20080: 00 00 00 00 nop
+#
+# CHECK: fnpic:
+# CHECK-NEXT: 20090: 00 00 00 00 nop
+# CHECK-NEXT: 20094: 3c 19 00 02 lui $25, 2
+# CHECK-NEXT: 20098: 08 00 80 20 j 131200 <fpic>
+# CHECK-NEXT: 2009c: 27 39 00 80 addiu $25, $25, 128
-# Make sure tha thunks are created properly no matter how
+# Make sure the thunks are created properly no matter how
# objects are laid out.
#
-# RUN: ld.lld %t-pic.o %t-npic.o %p/Inputs/mips-sto-pic.o -o %t.exe
+# RUN: ld.lld %t-pic.o %t-npic.o %t-sto-pic.o -o %t.exe
# RUN: llvm-objdump -d %t.exe | FileCheck -check-prefix=REVERSE %s
# REVERSE: foo1a:
@@ -107,20 +111,19 @@
# REVERSE-NEXT: 20064: 00 00 00 00 nop
# REVERSE-NEXT: 20068: 0c 00 80 0d jal 131124 <foo2+0x4>
# REVERSE-NEXT: 2006c: 00 00 00 00 nop
-# REVERSE-NEXT: 20070: 0c 00 80 28 jal 131232 <fnpic+0x10>
+# REVERSE-NEXT: 20070: 0c 00 80 25 jal 131220 <fnpic+0x4>
# REVERSE-NEXT: 20074: 00 00 00 00 nop
# REVERSE-NEXT: 20078: 0c 00 80 24 jal 131216 <fnpic>
# REVERSE-NEXT: 2007c: 00 00 00 00 nop
#
-#REVERSE: fpic:
-#REVERSE-NEXT: 20080: 00 00 00 00 00 00 00 00 ........
-#REVERSE-NEXT: 20088: 00 00 00 00 00 00 00 00
-#
-#REVERSE: fnpic:
-#REVERSE-NEXT: 20090: 00 00 00 00 00 00 00 00 ........
-#REVERSE-NEXT: 20098: 00 00 00 00 00 00 00 00 ........
-#REVERSE-NEXT: 200a0: 3c 19 00 02 08 00 80 20 <......
-#REVERSE-NEXT: 200a8: 27 39 00 80 00 00 00 00
+# REVERSE: fpic:
+# REVERSE-NEXT: 20080: 00 00 00 00 nop
+#
+# REVERSE: fnpic:
+# REVERSE-NEXT: 20090: 00 00 00 00 nop
+# REVERSE-NEXT: 20094: 3c 19 00 02 lui $25, 2
+# REVERSE-NEXT: 20098: 08 00 80 20 j 131200 <fpic>
+# REVERSE-NEXT: 2009c: 27 39 00 80 addiu $25, $25, 128
.text
.globl __start
More information about the llvm-commits
mailing list