summaryrefslogtreecommitdiffstats
path: root/lld
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2014-06-14 21:18:50 +0000
committerSimon Atanasyan <simon@atanasyan.com>2014-06-14 21:18:50 +0000
commit2e67be3cc2248a4281ff1411b12f8db65d9e6cdb (patch)
tree97bb3a301391ba9ec8987f0200329dd898df0b94 /lld
parentc7b4253cfb459022ac5152d6e4bd50e0f7e45936 (diff)
downloadbcm5719-llvm-2e67be3cc2248a4281ff1411b12f8db65d9e6cdb.tar.gz
bcm5719-llvm-2e67be3cc2248a4281ff1411b12f8db65d9e6cdb.zip
[Mips] Make gp-sym-1.test test case independent from external input files.
llvm-svn: 210981
Diffstat (limited to 'lld')
-rw-r--r--lld/test/elf/Mips/gp-sym-1.test35
1 files changed, 31 insertions, 4 deletions
diff --git a/lld/test/elf/Mips/gp-sym-1.test b/lld/test/elf/Mips/gp-sym-1.test
index f9ceba13f28..2492ba71e2a 100644
--- a/lld/test/elf/Mips/gp-sym-1.test
+++ b/lld/test/elf/Mips/gp-sym-1.test
@@ -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
+...
OpenPOWER on IntegriCloud