aboutsummaryrefslogtreecommitdiff
path: root/lld
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2014-07-08 15:47:55 +0000
committerSimon Atanasyan <simon@atanasyan.com>2014-07-08 15:47:55 +0000
commite693e8f8f0362b08658d0d74bc4c78198aa4ab70 (patch)
tree9c5b9a861c77e930bede18c513c4f00b9b865bf0 /lld
parent326ffb3683fa5198a9408e8c201149a7dde55fe9 (diff)
downloadllvm-e693e8f8f0362b08658d0d74bc4c78198aa4ab70.zip
llvm-e693e8f8f0362b08658d0d74bc4c78198aa4ab70.tar.gz
llvm-e693e8f8f0362b08658d0d74bc4c78198aa4ab70.tar.bz2
[Mips] Make rel-dynamic-07.test test case independent from external input files.
llvm-svn: 212542
Diffstat (limited to 'lld')
-rw-r--r--lld/test/elf/Mips/rel-dynamic-07.test64
1 files changed, 55 insertions, 9 deletions
diff --git a/lld/test/elf/Mips/rel-dynamic-07.test b/lld/test/elf/Mips/rel-dynamic-07.test
index ec43635d..d31c5bf 100644
--- a/lld/test/elf/Mips/rel-dynamic-07.test
+++ b/lld/test/elf/Mips/rel-dynamic-07.test
@@ -5,12 +5,12 @@
# a) Emitting of R_MIPS_REL32 relocations.
# b) There should be no R_MIPS_REL32 relocations for the _gp_disp symbol.
#
-# RUN: yaml2obj -format=elf %S/Inputs/pic-obj.yaml > %t-so-obj
-# RUN: lld -flavor gnu -target mipsel -shared -o %t-so %t-so-obj
-# RUN: yaml2obj -format=elf %s > %t-obj
+# RUN: yaml2obj -format=elf -docnum 1 %s > %t-so.o
+# RUN: lld -flavor gnu -target mipsel -shared -o %t1.so %t-so.o
+# RUN: yaml2obj -format=elf -docnum 2 %s > %t-o.o
# RUN: lld -flavor gnu -target mipsel -shared --noinhibit-exec \
-# RUN: -o %t1-so %t-obj %t-so
-# RUN: llvm-readobj -dt -r -sections %t1-so | FileCheck %s
+# RUN: -o %t2.so %t-o.o %t1.so
+# RUN: llvm-readobj -dt -r -sections %t2.so | FileCheck %s
# CHECK: Sections [
# CHECK: Section {
@@ -123,8 +123,54 @@
# CHECK-NEXT: }
# CHECK-NEXT: ]
-!ELF
-FileHeader: !FileHeader
+# 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]
+
+- Name: .data
+ Type: SHT_PROGBITS
+ Size: 0x08
+ AddressAlign: 16
+ Flags: [SHF_WRITE, SHF_ALLOC]
+
+Symbols:
+ Global:
+ - Name: T1
+ Section: .text
+ Type: STT_FUNC
+ Value: 0x0
+ Size: 4
+ - Name: T2
+ Section: .text
+ Type: STT_FUNC
+ Value: 0x4
+ Size: 4
+ - Name: D1
+ Section: .data
+ Type: STT_OBJECT
+ Value: 0x0
+ Size: 4
+ - Name: D2
+ Section: .data
+ Type: STT_OBJECT
+ Value: 0x4
+ Size: 4
+
+# o.o
+---
+FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_REL
@@ -134,13 +180,13 @@ FileHeader: !FileHeader
Sections:
- Name: .text
Type: SHT_PROGBITS
- Content: "000000000000000000000000"
+ Size: 0x0C
AddressAlign: 16
Flags: [SHF_EXECINSTR, SHF_ALLOC]
- Name: .data
Type: SHT_PROGBITS
- Content: "000000000000000000000000"
+ Size: 0x0C
AddressAlign: 16
Flags: [SHF_WRITE, SHF_ALLOC]