1 # RUN: yaml2obj --docnum=1 %s -o %t1
2 # RUN: llvm-objdump -p %t1 | FileCheck %s --strict-whitespace --match-full-lines --check-prefix=ELF64
4 # ELF64:Dynamic Section:
6 # ELF64-NEXT: PLTRELSZ 0x0000000000000010
7 # ELF64-NEXT: PLTGOT 0x0000000000001000
8 # ELF64-NEXT: HASH 0x0000000000001000
9 # ELF64-NEXT: STRTAB 0x0000000000001000
10 # ELF64-NEXT: SYMTAB 0x0000000000001000
11 # ELF64-NEXT: RELA 0x0000000000001000
12 # ELF64-NEXT: RELASZ 0x0000000000000010
13 # ELF64-NEXT: RELAENT 0x0000000000000789
14 # ELF64-NEXT: STRSZ 0x0000000000000010
15 # ELF64-NEXT: SYMENT 0x0000000000000987
16 # ELF64-NEXT: INIT 0x0000000000001000
17 # ELF64-NEXT: FINI 0x0000000000001000
18 # ELF64-NEXT: SONAME U
20 # ELF64-NEXT: SYMBOLIC 0x1234567890abcdef
21 # ELF64-NEXT: REL 0x0000000000001000
22 # ELF64-NEXT: RELSZ 0x0000000000000010
23 # ELF64-NEXT: RELENT 0x0000000000000123
24 # ELF64-NEXT: PLTREL 0x0000000000000007
25 # ELF64-NEXT: DEBUG 0xfedcba0987654321
26 # ELF64-NEXT: TEXTREL 0x1122334455667788
27 # ELF64-NEXT: JMPREL 0x0000000000001000
28 # ELF64-NEXT: BIND_NOW 0x8877665544332211
29 # ELF64-NEXT: INIT_ARRAY 0x0000000000001000
30 # ELF64-NEXT: FINI_ARRAY 0x0000000000001000
31 # ELF64-NEXT: INIT_ARRAYSZ 0x0000000000000010
32 # ELF64-NEXT: FINI_ARRAYSZ 0x0000000000000010
33 # ELF64-NEXT: RUNPATH w
34 # ELF64-NEXT: FLAGS 0xaabbccddeeff9900
35 # ELF64-NEXT: PREINIT_ARRAY 0x0000000000001000
36 # ELF64-NEXT: PREINIT_ARRAYSZ 0x0000000000000010
37 # ELF64-NEXT: SYMTAB_SHNDX 0x0000000000001000
38 # ELF64-NEXT: RELRSZ 0x0000000000000010
39 # ELF64-NEXT: RELR 0x0000000000001000
40 # ELF64-NEXT: RELRENT 0x0000000000004321
41 # ELF64-NEXT: ANDROID_REL 0x0000000000001000
42 # ELF64-NEXT: ANDROID_RELSZ 0x0000000000000010
43 # ELF64-NEXT: ANDROID_RELA 0x0000000000001000
44 # ELF64-NEXT: ANDROID_RELASZ 0x0000000000000010
45 # ELF64-NEXT: ANDROID_RELR 0x0000000000001000
46 # ELF64-NEXT: ANDROID_RELRSZ 0x0000000000000010
47 # ELF64-NEXT: ANDROID_RELRENT 0x0000000000001234
48 # ELF64-NEXT: GNU_HASH 0x0000000000001000
49 # ELF64-NEXT: TLSDESC_PLT 0x0000000000001000
50 # ELF64-NEXT: TLSDESC_GOT 0x0000000000001000
51 # ELF64-NEXT: RELACOUNT 0x0000000000000000
52 # ELF64-NEXT: RELCOUNT 0x0000000000000000
53 # ELF64-NEXT: FLAGS_1 0x0000000087654321
54 # ELF64-NEXT: VERSYM 0x0000000000001000
55 # ELF64-NEXT: VERDEF 0x0000000000001000
56 # ELF64-NEXT: VERDEFNUM 0x0000000000000000
57 # ELF64-NEXT: VERNEED 0x0000000000001000
58 # ELF64-NEXT: VERNEEDNUM 0x0000000000000000
59 # ELF64-NEXT: AUXILIARY D
60 # ELF64-NEXT: FILTER U
61 # ELF64-NEXT: <unknown:>0x12345678 0x8765432187654321
62 # ELF64-NEXT: <unknown:>0x6abcdef0 0x9988776655443322
63 # ELF64-NEXT: <unknown:>0x76543210 0x5555666677778888
77 Content: "004400550066007700"
114 Value: 0x1234567890abcdef
124 Value: 0xfedcba0987654321
126 Value: 0x1122334455667788
130 Value: 0x8877665544332211
135 - Tag: DT_INIT_ARRAYSZ
137 - Tag: DT_FINI_ARRAYSZ
142 Value: 0xaabbccddeeff9900
143 - Tag: DT_PREINIT_ARRAY
145 - Tag: DT_PREINIT_ARRAYSZ
147 - Tag: DT_SYMTAB_SHNDX
155 - Tag: DT_ANDROID_REL
157 - Tag: DT_ANDROID_RELSZ
159 - Tag: DT_ANDROID_RELA
161 - Tag: DT_ANDROID_RELASZ
163 - Tag: DT_ANDROID_RELR
165 - Tag: DT_ANDROID_RELRSZ
167 - Tag: DT_ANDROID_RELRENT
171 - Tag: DT_TLSDESC_PLT
173 - Tag: DT_TLSDESC_GOT
195 ## Show behaviour for unknown values in special and unmarked ranges.
196 ## An arbitrary unknown value outside of the special ranges.
198 Value: 0x8765432187654321
199 ## An OS specific tag.
201 Value: 0x9988776655443322
202 ## A processor specific tags.
204 Value: 0x5555666677778888
217 # RUN: yaml2obj --docnum=2 %s -o %t2
218 # RUN: llvm-objdump -p %t2 | FileCheck %s --strict-whitespace --match-full-lines --check-prefix=ELF32
220 # ELF32:Dynamic Section:
221 # ELF32-NEXT: NEEDED D
222 # ELF32-NEXT: PLTRELSZ 0x00000010
223 # ELF32-NEXT: PLTGOT 0x00001000
224 # ELF32-NEXT: HASH 0x00001000
225 # ELF32-NEXT: STRTAB 0x00001000
226 # ELF32-NEXT: SYMTAB 0x00001000
227 # ELF32-NEXT: RELA 0x00001000
228 # ELF32-NEXT: RELASZ 0x00000010
229 # ELF32-NEXT: RELAENT 0x00000789
230 # ELF32-NEXT: STRSZ 0x00000010
231 # ELF32-NEXT: SYMENT 0x00000987
232 # ELF32-NEXT: INIT 0x00001000
233 # ELF32-NEXT: FINI 0x00001000
234 # ELF32-NEXT: SONAME U
235 # ELF32-NEXT: RPATH f
236 # ELF32-NEXT: SYMBOLIC 0x12345678
237 # ELF32-NEXT: REL 0x00001000
238 # ELF32-NEXT: RELSZ 0x00000010
239 # ELF32-NEXT: RELENT 0x00000123
240 # ELF32-NEXT: PLTREL 0x00000007
241 # ELF32-NEXT: DEBUG 0xfedcba09
242 # ELF32-NEXT: TEXTREL 0x11223344
243 # ELF32-NEXT: JMPREL 0x00001000
244 # ELF32-NEXT: BIND_NOW 0x88776655
245 # ELF32-NEXT: INIT_ARRAY 0x00001000
246 # ELF32-NEXT: FINI_ARRAY 0x00001000
247 # ELF32-NEXT: INIT_ARRAYSZ 0x00000010
248 # ELF32-NEXT: FINI_ARRAYSZ 0x00000010
249 # ELF32-NEXT: RUNPATH w
250 # ELF32-NEXT: FLAGS 0xaabbccdd
251 # ELF32-NEXT: PREINIT_ARRAY 0x00001000
252 # ELF32-NEXT: PREINIT_ARRAYSZ 0x00000010
253 # ELF32-NEXT: SYMTAB_SHNDX 0x00001000
254 # ELF32-NEXT: RELRSZ 0x00000010
255 # ELF32-NEXT: RELR 0x00001000
256 # ELF32-NEXT: RELRENT 0x00004321
257 # ELF32-NEXT: ANDROID_REL 0x00001000
258 # ELF32-NEXT: ANDROID_RELSZ 0x00000010
259 # ELF32-NEXT: ANDROID_RELA 0x00001000
260 # ELF32-NEXT: ANDROID_RELASZ 0x00000010
261 # ELF32-NEXT: ANDROID_RELR 0x00001000
262 # ELF32-NEXT: ANDROID_RELRSZ 0x00000010
263 # ELF32-NEXT: ANDROID_RELRENT 0x00001234
264 # ELF32-NEXT: GNU_HASH 0x00001000
265 # ELF32-NEXT: TLSDESC_PLT 0x00001000
266 # ELF32-NEXT: TLSDESC_GOT 0x00001000
267 # ELF32-NEXT: RELACOUNT 0x00000000
268 # ELF32-NEXT: RELCOUNT 0x00000000
269 # ELF32-NEXT: FLAGS_1 0x87654321
270 # ELF32-NEXT: VERSYM 0x00001000
271 # ELF32-NEXT: VERDEF 0x00001000
272 # ELF32-NEXT: VERDEFNUM 0x00000000
273 # ELF32-NEXT: VERNEED 0x00001000
274 # ELF32-NEXT: VERNEEDNUM 0x00000000
275 # ELF32-NEXT: AUXILIARY D
276 # ELF32-NEXT: FILTER U
277 # ELF32-NEXT: <unknown:>0x12345678 0x87654321
278 # ELF32-NEXT: <unknown:>0x6abcdef0 0x99887766
279 # ELF32-NEXT: <unknown:>0x76543210 0x55556666
292 Content: "004400550066007700"
350 - Tag: DT_INIT_ARRAYSZ
352 - Tag: DT_FINI_ARRAYSZ
358 - Tag: DT_PREINIT_ARRAY
360 - Tag: DT_PREINIT_ARRAYSZ
362 - Tag: DT_SYMTAB_SHNDX
370 - Tag: DT_ANDROID_REL
372 - Tag: DT_ANDROID_RELSZ
374 - Tag: DT_ANDROID_RELA
376 - Tag: DT_ANDROID_RELASZ
378 - Tag: DT_ANDROID_RELR
380 - Tag: DT_ANDROID_RELRSZ
382 - Tag: DT_ANDROID_RELRENT
386 - Tag: DT_TLSDESC_PLT
388 - Tag: DT_TLSDESC_GOT
410 ## Show behaviour for unknown values in special and unmarked ranges.
411 ## An arbitrary unknown value outside of the special ranges.
414 ## An OS specific tag.
417 ## A processor specific tags.
432 ## When printing the value column we want to have the minimal possible indentation.
433 ## Use an arbitrary dynamic tag to demonstrate that.
435 # RUN: yaml2obj --docnum=3 %s -o %t3
436 # RUN: llvm-objdump -p %t3 | FileCheck %s --strict-whitespace --check-prefix=INDENT
438 # RUN: yaml2obj --docnum=4 %s -o %t4
439 # RUN: llvm-objdump -p %t4 | FileCheck %s --strict-whitespace --check-prefix=INDENT
441 # INDENT: {{^}}Dynamic Section:
442 # INDENT: {{^}} NEEDED 0x