File tree Expand file tree Collapse file tree 1 file changed +59
-7
lines changed Expand file tree Collapse file tree 1 file changed +59
-7
lines changed Original file line number Diff line number Diff line change 5
5
# a) There should be no dynamic relocations.
6
6
# b) There should be no PLT entries.
7
7
#
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
12
12
13
13
# PLT-SYM: Sections [
14
14
# PLT-SYM: Section {
29
29
# PLT-SYM-NEXT: }
30
30
# PLT-SYM-NEXT: ]
31
31
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
+ ---
33
84
FileHeader: !FileHeader
34
85
Class: ELFCLASS32
35
86
Data: ELFDATA2LSB
@@ -40,13 +91,13 @@ FileHeader: !FileHeader
40
91
Sections:
41
92
- Name: .text
42
93
Type: SHT_PROGBITS
43
- Content: "0000000000000000"
94
+ Size: 0x08
44
95
AddressAlign: 16
45
96
Flags: [SHF_EXECINSTR, SHF_ALLOC]
46
97
47
98
- Name: .data
48
99
Type: SHT_PROGBITS
49
- Content: "0000000000000000"
100
+ Size: 0x08
50
101
AddressAlign: 16
51
102
Flags: [SHF_WRITE, SHF_ALLOC]
52
103
@@ -106,3 +157,4 @@ Symbols:
106
157
Type: STT_OBJECT
107
158
- Name: D2
108
159
Type: STT_OBJECT
160
+ ...
You can’t perform that action at this time.
0 commit comments