summaryrefslogtreecommitdiff
path: root/test/old-elf/X86_64/yamlinput.test
blob: 1c51811eec95fd8894292d159fa6403bcb364f7c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# This tests the functionality that lld is able to read
# an input YAML from a previous link

RUN: lld -flavor old-gnu -target x86_64-linux %p/Inputs/initfini.o \
RUN: --noinhibit-exec --output-filetype=yaml -o %t.objtxt
RUN: lld -flavor old-gnu -target x86_64-linux %t.objtxt \
RUN: --noinhibit-exec -o %t1
RUN: llvm-readobj -sections %t1 | FileCheck %s -check-prefix=SECTIONS

SECTIONS:   Section {
SECTIONS:     Index: 0
SECTIONS:     Name:  (0)
SECTIONS:     Type: SHT_NULL (0x0)
SECTIONS:     Flags [ (0x0)
SECTIONS:     ]
SECTIONS:   }
SECTIONS:   Section {
SECTIONS:     Index: 1
SECTIONS:     Name: .interp
SECTIONS:     Type: SHT_PROGBITS (0x1)
SECTIONS:     Flags [ (0x2)
SECTIONS:       SHF_ALLOC (0x2)
SECTIONS:     ]
SECTIONS:   }
SECTIONS:   Section {
SECTIONS:     Index: 2
SECTIONS:     Name: .hash
SECTIONS:     Type: SHT_HASH (0x5)
SECTIONS:     Flags [ (0x2)
SECTIONS:       SHF_ALLOC (0x2)
SECTIONS:     ]
SECTIONS:   }
SECTIONS:   Section {
SECTIONS:     Index: 3
SECTIONS:     Name: .dynsym
SECTIONS:     Type: SHT_DYNSYM (0xB)
SECTIONS:     Flags [ (0x2)
SECTIONS:       SHF_ALLOC (0x2)
SECTIONS:     ]
SECTIONS:   }
SECTIONS:   Section {
SECTIONS:     Index: 4
SECTIONS:     Name: .dynstr
SECTIONS:     Type: SHT_STRTAB (0x3)
SECTIONS:     Flags [ (0x2)
SECTIONS:       SHF_ALLOC (0x2)
SECTIONS:     ]
SECTIONS:   }
SECTIONS:   Section {
SECTIONS:     Index: 5
SECTIONS:     Name: .text
SECTIONS:     Type: SHT_PROGBITS (0x1)
SECTIONS:     Flags [ (0x6)
SECTIONS:       SHF_ALLOC (0x2)
SECTIONS:       SHF_EXECINSTR (0x4)
SECTIONS:     ]
SECTIONS:   }
SECTIONS:   Section {
SECTIONS:     Index: 6
SECTIONS:     Name: .rodata
SECTIONS:     Type: SHT_PROGBITS (0x1)
SECTIONS:     Flags [ (0x2)
SECTIONS:       SHF_ALLOC (0x2)
SECTIONS:     ]
SECTIONS:   }
SECTIONS:   Section {
SECTIONS:     Index: 7
SECTIONS:     Name: .eh_frame
SECTIONS:     Type: SHT_PROGBITS (0x1)
SECTIONS:     Flags [ (0x2)
SECTIONS:       SHF_ALLOC (0x2)
SECTIONS:     ]
SECTIONS:   }
SECTIONS:   Section {
SECTIONS:     Index: 8
SECTIONS:     Name: .eh_frame_hdr
SECTIONS:   }
SECTIONS:   Section {
SECTIONS:     Index: 9
SECTIONS:     Name: .init_array
SECTIONS:     Type: SHT_PROGBITS (0x1)
SECTIONS:     Flags [ (0x3)
SECTIONS:       SHF_ALLOC (0x2)
SECTIONS:       SHF_WRITE (0x1)
SECTIONS:     ]
SECTIONS:   }
SECTIONS:   Section {
SECTIONS:     Index: 10
SECTIONS:     Name: .fini_array
SECTIONS:     Type: SHT_PROGBITS (0x1)
SECTIONS:     Flags [ (0x3)
SECTIONS:       SHF_ALLOC (0x2)
SECTIONS:       SHF_WRITE (0x1)
SECTIONS:     ]
SECTIONS:   }
SECTIONS:   Section {
SECTIONS:     Index: 11
SECTIONS:     Name: .dynamic
SECTIONS:     Type: SHT_DYNAMIC (0x6)
SECTIONS:     Flags [ (0x3)
SECTIONS:       SHF_ALLOC (0x2)
SECTIONS:       SHF_WRITE (0x1)
SECTIONS:     ]
SECTIONS:   }
SECTIONS:   Section {
SECTIONS:     Index: 12
SECTIONS:     Name: .got.plt
SECTIONS:     Type: SHT_PROGBITS (0x1)
SECTIONS:     Flags [ (0x3)
SECTIONS:       SHF_ALLOC (0x2)
SECTIONS:       SHF_WRITE (0x1)
SECTIONS:     ]
SECTIONS:   }
SECTIONS:   Section {
SECTIONS:     Index: 13
SECTIONS:     Name: .data
SECTIONS:     Type: SHT_PROGBITS (0x1)
SECTIONS:     Flags [ (0x3)
SECTIONS:       SHF_ALLOC (0x2)
SECTIONS:       SHF_WRITE (0x1)
SECTIONS:     ]
SECTIONS:   }
SECTIONS:   Section {
SECTIONS:     Index: 14
SECTIONS:     Name: .bss
SECTIONS:     Type: SHT_NOBITS (0x8)
SECTIONS:     Flags [ (0x3)
SECTIONS:       SHF_ALLOC (0x2)
SECTIONS:       SHF_WRITE (0x1)
SECTIONS:     ]
SECTIONS:   }
SECTIONS:   Section {
SECTIONS:     Index: 15
SECTIONS:     Name: .comment
SECTIONS:     Type: SHT_PROGBITS (0x1)
SECTIONS:     Flags [ (0x0)
SECTIONS:     ]
SECTIONS:   }
SECTIONS:   Section {
SECTIONS:     Index: 16
SECTIONS:     Name: .note.GNU-stack
SECTIONS:     Type: SHT_PROGBITS (0x1)
SECTIONS:     Flags [ (0x0)
SECTIONS:     ]
SECTIONS:   }
SECTIONS:   Section {
SECTIONS:     Index: 17
SECTIONS:     Name: .shstrtab
SECTIONS:     Type: SHT_STRTAB (0x3)
SECTIONS:     Flags [ (0x0)
SECTIONS:     ]
SECTIONS:   }
SECTIONS:   Section {
SECTIONS:     Index: 18
SECTIONS:     Name: .symtab
SECTIONS:     Type: SHT_SYMTAB (0x2)
SECTIONS:     Flags [ (0x0)
SECTIONS:     ]
SECTIONS:   }
SECTIONS:   Section {
SECTIONS:     Index: 19
SECTIONS:     Name: .strtab
SECTIONS:     Type: SHT_STRTAB (0x3)
SECTIONS:     Flags [ (0x0)
SECTIONS:     ]
SECTIONS:   }