Skip to content

Commit d092f0e

Browse files
committed
[Mips] Make rel-dynamic-10.test test case independent from external input files.
llvm-svn: 212758
1 parent b415325 commit d092f0e

File tree

1 file changed

+59
-7
lines changed

1 file changed

+59
-7
lines changed

lld/test/elf/Mips/rel-dynamic-10.test

Lines changed: 59 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
# a) There should be no dynamic relocations.
66
# b) There should be no PLT entries.
77
#
8-
# RUN: yaml2obj -format=elf %s > %t-obj1
9-
# RUN: yaml2obj -format=elf %S/Inputs/pic-obj.yaml > %t-obj2
10-
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t3-exe %t-obj1 %t-obj2
11-
# RUN: llvm-readobj -dt -r -s %t3-exe | FileCheck -check-prefix=PLT-SYM %s
8+
# RUN: yaml2obj -format=elf -docnum 1 %s > %t-o1.o
9+
# RUN: yaml2obj -format=elf -docnum 2 %s > %t-o2.o
10+
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t-o1.o %t-o2.o
11+
# RUN: llvm-readobj -dt -r -s %t.exe | FileCheck -check-prefix=PLT-SYM %s
1212

1313
# PLT-SYM: Sections [
1414
# PLT-SYM: Section {
@@ -29,7 +29,58 @@
2929
# PLT-SYM-NEXT: }
3030
# PLT-SYM-NEXT: ]
3131

32-
!ELF
32+
# o1.o
33+
---
34+
FileHeader:
35+
Class: ELFCLASS32
36+
Data: ELFDATA2LSB
37+
Type: ET_REL
38+
Machine: EM_MIPS
39+
Flags: [EF_MIPS_PIC, EF_MIPS_CPIC]
40+
41+
Sections:
42+
- Name: .text
43+
Type: SHT_PROGBITS
44+
Size: 0x0C
45+
AddressAlign: 16
46+
Flags: [SHF_EXECINSTR, SHF_ALLOC]
47+
48+
- Name: .data
49+
Type: SHT_PROGBITS
50+
Size: 0x08
51+
AddressAlign: 16
52+
Flags: [SHF_WRITE, SHF_ALLOC]
53+
54+
Symbols:
55+
Global:
56+
- Name: T1
57+
Section: .text
58+
Type: STT_FUNC
59+
Value: 0x0
60+
Size: 4
61+
- Name: T2
62+
Section: .text
63+
Type: STT_FUNC
64+
Value: 0x4
65+
Size: 4
66+
- Name: T3
67+
Section: .text
68+
Type: STT_FUNC
69+
Value: 0x8
70+
Size: 4
71+
- Name: D1
72+
Section: .data
73+
Type: STT_OBJECT
74+
Value: 0x0
75+
Size: 4
76+
- Name: D2
77+
Section: .data
78+
Type: STT_OBJECT
79+
Value: 0x4
80+
Size: 4
81+
82+
# o2.o
83+
---
3384
FileHeader: !FileHeader
3485
Class: ELFCLASS32
3586
Data: ELFDATA2LSB
@@ -40,13 +91,13 @@ FileHeader: !FileHeader
4091
Sections:
4192
- Name: .text
4293
Type: SHT_PROGBITS
43-
Content: "0000000000000000"
94+
Size: 0x08
4495
AddressAlign: 16
4596
Flags: [SHF_EXECINSTR, SHF_ALLOC]
4697

4798
- Name: .data
4899
Type: SHT_PROGBITS
49-
Content: "0000000000000000"
100+
Size: 0x08
50101
AddressAlign: 16
51102
Flags: [SHF_WRITE, SHF_ALLOC]
52103

@@ -106,3 +157,4 @@ Symbols:
106157
Type: STT_OBJECT
107158
- Name: D2
108159
Type: STT_OBJECT
160+
...

0 commit comments

Comments
 (0)