diff options
| author | Simon Atanasyan <simon@atanasyan.com> | 2016-09-29 12:58:42 +0000 |
|---|---|---|
| committer | Simon Atanasyan <simon@atanasyan.com> | 2016-09-29 12:58:42 +0000 |
| commit | f4a1d8d0e031cd8f50ad727f584ba6ea39170c3d (patch) | |
| tree | 15fc63952ee01d758910f8f6b9750b7552b632fe | |
| parent | f967f090b830d1ae2547207e3311b877a2e0466a (diff) | |
| download | bcm5719-llvm-f4a1d8d0e031cd8f50ad727f584ba6ea39170c3d.tar.gz bcm5719-llvm-f4a1d8d0e031cd8f50ad727f584ba6ea39170c3d.zip | |
[ELF][MIPS] Do not use a binary input file in the test case. NFC
llvm-svn: 282715
| -rw-r--r-- | lld/test/ELF/Inputs/mips-fnpic.s | 6 | ||||
| -rw-r--r-- | lld/test/ELF/Inputs/mips-fpic.s | 6 | ||||
| -rw-r--r-- | lld/test/ELF/Inputs/mips-sto-pic.o | bin | 672 -> 0 bytes | |||
| -rw-r--r-- | lld/test/ELF/mips-npic-call-pic.s | 47 |
4 files changed, 37 insertions, 22 deletions
diff --git a/lld/test/ELF/Inputs/mips-fnpic.s b/lld/test/ELF/Inputs/mips-fnpic.s new file mode 100644 index 00000000000..d8bf0ba34f5 --- /dev/null +++ b/lld/test/ELF/Inputs/mips-fnpic.s @@ -0,0 +1,6 @@ + .option pic0 + .text + .global fnpic + .type fnpic, @function +fnpic: + nop diff --git a/lld/test/ELF/Inputs/mips-fpic.s b/lld/test/ELF/Inputs/mips-fpic.s new file mode 100644 index 00000000000..b7af281c325 --- /dev/null +++ b/lld/test/ELF/Inputs/mips-fpic.s @@ -0,0 +1,6 @@ + .option pic2 + .text + .global fpic + .type fpic, @function +fpic: + nop diff --git a/lld/test/ELF/Inputs/mips-sto-pic.o b/lld/test/ELF/Inputs/mips-sto-pic.o Binary files differdeleted file mode 100644 index 484dbc41782..00000000000 --- a/lld/test/ELF/Inputs/mips-sto-pic.o +++ /dev/null diff --git a/lld/test/ELF/mips-npic-call-pic.s b/lld/test/ELF/mips-npic-call-pic.s index 13690808c54..76c392e1f66 100644 --- a/lld/test/ELF/mips-npic-call-pic.s +++ b/lld/test/ELF/mips-npic-call-pic.s @@ -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: fpic: +# REVERSE-NEXT: 20080: 00 00 00 00 nop # -#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: 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 |

