[lld] r210981 - [Mips] Make gp-sym-1.test test case independent from external input files.
Simon Atanasyan
simon at atanasyan.com
Sat Jun 14 14:18:52 PDT 2014
Author: atanasyan
Date: Sat Jun 14 16:18:50 2014
New Revision: 210981
URL: http://llvm.org/viewvc/llvm-project?rev=210981&view=rev
Log:
[Mips] Make gp-sym-1.test test case independent from external input files.
Modified:
lld/trunk/test/elf/Mips/gp-sym-1.test
Modified: lld/trunk/test/elf/Mips/gp-sym-1.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/gp-sym-1.test?rev=210981&r1=210980&r2=210981&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/gp-sym-1.test (original)
+++ lld/trunk/test/elf/Mips/gp-sym-1.test Sat Jun 14 16:18:50 2014
@@ -1,9 +1,9 @@
# Check that relocations against __gnu_local_gp use "gp" value as target.
-# RUN: yaml2obj -format=elf %S/Inputs/pic-obj.yaml > %t-pic.o
-# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t-pic.o
-# RUN: yaml2obj -format=elf %s > %t.o
-# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.o %t.so
+# RUN: yaml2obj -format=elf -docnum 1 %s > %t-so.o
+# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t-so.o
+# RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o
+# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t-o.o %t.so
# RUN: llvm-readobj -symbols %t.exe | FileCheck -check-prefix=SYM %s
# RUN: llvm-objdump -s %t.exe | FileCheck -check-prefix=SEC %s
@@ -15,6 +15,32 @@
# SEC: Contents of section .got:
# SEC-NEXT: 401000 00000000 00000080 ........
+# so.o
+---
+FileHeader:
+ Class: ELFCLASS32
+ Data: ELFDATA2LSB
+ Type: ET_REL
+ Machine: EM_MIPS
+ Flags: [EF_MIPS_PIC, EF_MIPS_CPIC]
+
+Sections:
+ - Name: .text
+ Type: SHT_PROGBITS
+ Size: 0x0C
+ AddressAlign: 16
+ Flags: [SHF_EXECINSTR, SHF_ALLOC]
+
+Symbols:
+ Global:
+ - Name: T1
+ Section: .text
+ Type: STT_FUNC
+ Value: 0x0
+ Size: 4
+
+# o.o
+---
FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
@@ -57,3 +83,4 @@ Symbols:
Size: 0x08
- Name: __gnu_local_gp
- Name: T1
+...
More information about the llvm-commits
mailing list