1 ## Test how llvm-readobj/llvm-readelf tools handle invalid SHT_GNU_verneed sections.
3 ## In the first case we have a SHT_GNU_versym section that refers to
4 ## a version listed in a SHT_GNU_verneed section. That version has an
5 ## empty name, making it invalid.
7 # RUN: yaml2obj --docnum=1 %s -o %t1
8 # RUN: llvm-readelf -V %t1 | FileCheck %s --check-prefix=GNU-VERNEED-NAME
9 # RUN: llvm-readobj -V %t1 | FileCheck %s --check-prefix=LLVM-VERNEED-NAME
11 # GNU-VERNEED-NAME: Version symbols section '.gnu.version' contains 2 entries:
12 # GNU-VERNEED-NAME-NEXT: Addr: 0000000000200210 Offset: 0x000040 Link: 3 (.dynsym)
13 # GNU-VERNEED-NAME-NEXT: 000: 0 (*local*) 2 ()
15 # GNU-VERNEED-NAME: Version needs section '.gnu.version_r' contains 1 entries:
16 # GNU-VERNEED-NAME-NEXT: Addr: 0000000000200214 Offset: 0x000044 Link: 4 (.dynstr)
17 # GNU-VERNEED-NAME-NEXT: 0x0000: Version: 1 File: somefile Cnt: 1
18 # GNU-VERNEED-NAME-NEXT: 0x0010: Name: Flags: none Version: 2
20 # LLVM-VERNEED-NAME: VersionSymbols [
21 # LLVM-VERNEED-NAME: Symbol {
22 # LLVM-VERNEED-NAME-NEXT: Version: 0
23 # LLVM-VERNEED-NAME-NEXT: Name:
24 # LLVM-VERNEED-NAME-NEXT: }
25 # LLVM-VERNEED-NAME-NEXT: Symbol {
26 # LLVM-VERNEED-NAME-NEXT: Version: 2
27 # LLVM-VERNEED-NAME-NEXT: Name: foo
28 # LLVM-VERNEED-NAME-NEXT: }
29 # LLVM-VERNEED-NAME-NEXT: ]
31 # LLVM-VERNEED-NAME: VersionRequirements [
32 # LLVM-VERNEED-NAME-NEXT: Dependency {
33 # LLVM-VERNEED-NAME-NEXT: Version: 1
34 # LLVM-VERNEED-NAME-NEXT: Count: 1
35 # LLVM-VERNEED-NAME-NEXT: FileName: somefile
36 # LLVM-VERNEED-NAME-NEXT: Entries [
37 # LLVM-VERNEED-NAME-NEXT: Entry {
38 # LLVM-VERNEED-NAME-NEXT: Hash: 0
39 # LLVM-VERNEED-NAME-NEXT: Flags [ (0x0)
40 # LLVM-VERNEED-NAME-NEXT: ]
41 # LLVM-VERNEED-NAME-NEXT: Index: 2
42 # LLVM-VERNEED-NAME-NEXT: Name: {{$}}
43 # LLVM-VERNEED-NAME-NEXT: }
44 # LLVM-VERNEED-NAME-NEXT: ]
45 # LLVM-VERNEED-NAME-NEXT: }
46 # LLVM-VERNEED-NAME-NEXT: ]
59 - Name: .gnu.version_r
67 - Name: '' ## invalid name
76 ## In this case SHT_GNU_verneed is not linked to a dynamic string table. We check we handle
77 ## this situation properly.
79 # RUN: yaml2obj --docnum=2 %s -o %t2
80 # RUN: llvm-readelf -V %t2 2>&1 | FileCheck %s -DFILE=%t2 --check-prefix=GNU-NOLINK
81 # RUN: llvm-readobj -V %t2 2>&1 | FileCheck %s -DFILE=%t2 --check-prefix=LLVM-NOLINK
83 # GNU-NOLINK: Version symbols section '.gnu.version' contains 2 entries:
84 # GNU-NOLINK-NEXT: Addr: 0000000000000000 Offset: 0x000040 Link: 3 (.dynsym)
85 # GNU-NOLINK-NEXT: warning: '[[FILE]]': invalid string table linked to SHT_GNU_verneed section with index 2: invalid sh_type for string table section [index 0]: expected SHT_STRTAB, but got SHT_NULL
86 # GNU-NOLINK-NEXT: 000: 0 (*local*) 2 (<corrupt>)
87 # GNU-NOLINK: Version needs section '.gnu.version_r' contains 1 entries:
88 # GNU-NOLINK-NEXT: Addr: 0000000000000004 Offset: 0x000044 Link: 0 ()
89 # GNU-NOLINK-NEXT: 0x0000: Version: 1 File: <corrupt vn_file: 9> Cnt: 1
90 # GNU-NOLINK-NEXT: 0x0010: Name: <corrupt> Flags: none Version: 2
92 # LLVM-NOLINK: VersionSymbols [
93 # LLVM-NOLINK: Symbol {
94 # LLVM-NOLINK-NEXT: Version: 0
95 # LLVM-NOLINK-NEXT: Name:
97 # LLVM-NOLINK-NEXT: Symbol {
98 # LLVM-NOLINK-NEXT: Version: 2
99 # LLVM-NOLINK-NEXT: warning: '[[FILE]]': invalid string table linked to SHT_GNU_verneed section with index 2: invalid sh_type for string table section [index 0]: expected SHT_STRTAB, but got SHT_NULL
100 # LLVM-NOLINK-NEXT: Name: foo@<corrupt>
101 # LLVM-NOLINK-NEXT: }
102 # LLVM-NOLINK-NEXT: ]
104 # LLVM-NOLINK: VersionRequirements [
105 # LLVM-NOLINK-NEXT: Dependency {
106 # LLVM-NOLINK-NEXT: Version: 1
107 # LLVM-NOLINK-NEXT: Count: 1
108 # LLVM-NOLINK-NEXT: FileName: <corrupt vn_file: 9>
109 # LLVM-NOLINK-NEXT: Entries [
110 # LLVM-NOLINK-NEXT: Entry {
111 # LLVM-NOLINK-NEXT: Hash: 0
112 # LLVM-NOLINK-NEXT: Flags [ (0x0)
113 # LLVM-NOLINK-NEXT: ]
114 # LLVM-NOLINK-NEXT: Index: 2
115 # LLVM-NOLINK-NEXT: Name: <corrupt>
116 # LLVM-NOLINK-NEXT: }
117 # LLVM-NOLINK-NEXT: ]
118 # LLVM-NOLINK-NEXT: }
119 # LLVM-NOLINK-NEXT: ]
131 - Name: .gnu.version_r
132 Type: SHT_GNU_verneed
148 ## We can't parse misaligned auxiliary version records.
150 # RUN: yaml2obj --docnum=3 %s -o %t3
151 # RUN: llvm-readelf -V %t3 2>&1 | FileCheck %s -DFILE=%t3 --check-prefix=BROKEN-AUX-GNU
152 # RUN: llvm-readobj -V %t3 2>&1 | FileCheck %s -DFILE=%t3 --check-prefix=BROKEN-AUX-LLVM
154 # BROKEN-AUX-GNU: Version symbols section '.gnu.version' contains 1 entries:
155 # BROKEN-AUX-GNU-NEXT: Addr: 0000000000000000 Offset: 0x000040 Link: 3 (.dynsym)
156 # BROKEN-AUX-GNU-NEXT: warning: '[[FILE]]': invalid SHT_GNU_verneed section with index 2: found a misaligned auxiliary entry at offset 0x11
157 # BROKEN-AUX-GNU-NEXT: 000: 2 (<corrupt>)
159 # BROKEN-AUX-LLVM: VersionSymbols [
160 # BROKEN-AUX-LLVM-NEXT: Symbol {
161 # BROKEN-AUX-LLVM-NEXT: Version: 2
162 # BROKEN-AUX-LLVM-NEXT: warning: '[[FILE]]': invalid SHT_GNU_verneed section with index 2: found a misaligned auxiliary entry at offset 0x11
163 # BROKEN-AUX-LLVM-NEXT: Name: @<corrupt>
164 # BROKEN-AUX-LLVM-NEXT: }
165 # BROKEN-AUX-LLVM-NEXT: ]
177 - Name: .gnu.version_r
178 Type: SHT_GNU_verneed
182 ## The byte offset to the auxiliary entry is 0x11, i.e. it is not correctly aligned in memory.
183 Content: "0100010001000000110000000000000000000000"
186 ## Here we check that we can properly dump the case when a dependency file name
187 ## and/or a dependency name string offset is equal to the string table size.
189 ## We set the version dependency vn_file field to the offset of string 'foo' in
190 ## the .dynstr, which is 1. We create a custom string table .mystrtab of size 1
191 ## and link it with the .gnu.version_r section. For the vna_name we use the same trick.
193 # RUN: yaml2obj --docnum=4 %s -o %t4
194 # RUN: llvm-readobj --sections --section-data -V %t4 | FileCheck %s --check-prefix=LLVM-OFFSET-EQ
195 # RUN: llvm-readelf --sections -V %t4 | FileCheck %s --check-prefix=GNU-OFFSET-EQ
197 # LLVM-OFFSET-EQ: Name: .mystrtab
198 # LLVM-OFFSET-EQ: Size:
199 # LLVM-OFFSET-EQ-SAME: 1
201 # LLVM-OFFSET-EQ: Name: .dynstr
202 # LLVM-OFFSET-EQ: SectionData (
203 # LLVM-OFFSET-EQ-NEXT: 0000: 00666F6F 00 |.foo.|
204 # LLVM-OFFSET-EQ-NEXT: )
206 # LLVM-OFFSET-EQ: VersionRequirements [
207 # LLVM-OFFSET-EQ-NEXT: Dependency {
208 # LLVM-OFFSET-EQ-NEXT: Version: 1
209 # LLVM-OFFSET-EQ-NEXT: Count: 1
210 # LLVM-OFFSET-EQ-NEXT: FileName: <corrupt vn_file: 1>
211 # LLVM-OFFSET-EQ-NEXT: Entries [
212 # LLVM-OFFSET-EQ-NEXT: Entry {
213 # LLVM-OFFSET-EQ-NEXT: Hash: 0
214 # LLVM-OFFSET-EQ-NEXT: Flags [ (0x0)
215 # LLVM-OFFSET-EQ-NEXT: ]
216 # LLVM-OFFSET-EQ-NEXT: Index: 0
217 # LLVM-OFFSET-EQ-NEXT: Name: <corrupt>
218 # LLVM-OFFSET-EQ-NEXT: }
219 # LLVM-OFFSET-EQ-NEXT: ]
220 # LLVM-OFFSET-EQ-NEXT: }
221 # LLVM-OFFSET-EQ-NEXT: ]
223 # GNU-OFFSET-EQ: Version needs section '.gnu.version_r' contains 1 entries:
224 # GNU-OFFSET-EQ-NEXT: Addr: 0000000000000004 Offset: 0x000044 Link: 1 (.mystrtab)
225 # GNU-OFFSET-EQ-NEXT: 0x0000: Version: 1 File: <corrupt vn_file: 1> Cnt: 1
226 # GNU-OFFSET-EQ-NEXT: 0x0010: Name: <corrupt> Flags: none Version: 0
237 - Name: .gnu.version_r
238 Type: SHT_GNU_verneed
253 ## Here we check that we can properly dump the case when a dependency file name
254 ## and/or a dependency name string offset is greater than the string table size.
256 # RUN: yaml2obj --docnum=5 %s -o %t5
257 # RUN: llvm-readobj --sections -V %t5 | FileCheck %s --check-prefix=LLVM-OFFSET-GR
258 # RUN: llvm-readelf --sections -V %t5 | FileCheck %s --check-prefix=GNU-OFFSET-GR
260 # LLVM-OFFSET-GR: VersionRequirements [
261 # LLVM-OFFSET-GR-NEXT: Dependency {
262 # LLVM-OFFSET-GR-NEXT: Version: 1
263 # LLVM-OFFSET-GR-NEXT: Count: 1
264 # LLVM-OFFSET-GR-NEXT: FileName: <corrupt vn_file: 1>
265 # LLVM-OFFSET-GR-NEXT: Entries [
266 # LLVM-OFFSET-GR-NEXT: Entry {
267 # LLVM-OFFSET-GR-NEXT: Hash: 0
268 # LLVM-OFFSET-GR-NEXT: Flags [ (0x0)
269 # LLVM-OFFSET-GR-NEXT: ]
270 # LLVM-OFFSET-GR-NEXT: Index: 0
271 # LLVM-OFFSET-GR-NEXT: Name: <corrupt>
272 # LLVM-OFFSET-GR-NEXT: }
273 # LLVM-OFFSET-GR-NEXT: ]
274 # LLVM-OFFSET-GR-NEXT: }
275 # LLVM-OFFSET-GR-NEXT: ]
277 # GNU-OFFSET-GR: Version needs section '.gnu.version_r' contains 1 entries:
278 # GNU-OFFSET-GR-NEXT: Addr: 0000000000000000 Offset: 0x000040 Link: 1 (.mystrtab)
279 # GNU-OFFSET-GR-NEXT: 0x0000: Version: 1 File: <corrupt vn_file: 1> Cnt: 1
280 # GNU-OFFSET-GR-NEXT: 0x0010: Name: <corrupt> Flags: none Version: 0
291 - Name: .gnu.version_r
292 Type: SHT_GNU_verneed
307 ## Check that we report a warning when sh_link references a non-existent section.
309 # RUN: yaml2obj --docnum=6 %s -DLINK=0xFF -o %t6
310 # RUN: llvm-readobj --sections -V %t6 2>&1 | FileCheck %s -DFILE=%t6 --implicit-check-not="warning:" --check-prefix=INVALID-LINK-LLVM
311 # RUN: llvm-readelf --sections -V %t6 2>&1 | FileCheck %s -DFILE=%t6 --implicit-check-not="warning:" --check-prefix=INVALID-LINK-GNU
313 # INVALID-LINK-LLVM: VersionRequirements [
314 # INVALID-LINK-LLVM-NEXT: warning: '[[FILE]]': invalid section linked to SHT_GNU_verneed section with index 1: invalid section index: 255
315 # INVALID-LINK-LLVM-NEXT: Dependency {
316 # INVALID-LINK-LLVM-NEXT: Version: 1
317 # INVALID-LINK-LLVM-NEXT: Count: 1
318 # INVALID-LINK-LLVM-NEXT: FileName: <corrupt vn_file: 1>
319 # INVALID-LINK-LLVM-NEXT: Entries [
320 # INVALID-LINK-LLVM-NEXT: Entry {
321 # INVALID-LINK-LLVM-NEXT: Hash: 0
322 # INVALID-LINK-LLVM-NEXT: Flags [ (0x0)
323 # INVALID-LINK-LLVM-NEXT: ]
324 # INVALID-LINK-LLVM-NEXT: Index: 0
325 # INVALID-LINK-LLVM-NEXT: Name: <corrupt>
326 # INVALID-LINK-LLVM-NEXT: }
327 # INVALID-LINK-LLVM-NEXT: ]
328 # INVALID-LINK-LLVM-NEXT: }
329 # INVALID-LINK-LLVM-NEXT: ]
331 # INVALID-LINK-GNU: Version needs section '.gnu.version_r' contains 1 entries:
332 # INVALID-LINK-GNU-NEXT: warning: '[[FILE]]': invalid section linked to SHT_GNU_verneed section with index 1: invalid section index: 255
333 # INVALID-LINK-GNU-NEXT: Addr: 0000000000000000 Offset: 0x000040 Link: 255 (<corrupt>)
334 # INVALID-LINK-GNU-NEXT: 0x0000: Version: 1 File: <corrupt vn_file: 1> Cnt: 1
335 # INVALID-LINK-GNU-NEXT: 0x0010: Name: <corrupt> Flags: none Version: 0
343 - Name: .gnu.version_r
344 Type: SHT_GNU_verneed
346 Link: [[LINK=.dynstr]]
347 ShName: [[SHNAME=<none>]]
358 ShName: [[DYNSTRNAME=<none>]]
362 ## Check that llvm-readelf reports a warning when the name of the SHT_GNU_verneed section can't be read.
364 # RUN: yaml2obj --docnum=6 %s -DSHNAME=0xFFFFFFFF -o %t.invalid.name
365 # RUN: llvm-readobj -V %t.invalid.name 2>&1 | \
366 # RUN: FileCheck %s -DFILE=%t.invalid.name --check-prefix=INVALID-NAME-LLVM --implicit-check-not=warning:
367 # RUN: llvm-readelf -V %t.invalid.name 2>&1 | \
368 # RUN: FileCheck %s -DFILE=%t.invalid.name --check-prefix=INVALID-NAME-GNU --implicit-check-not=warning:
370 # INVALID-NAME-LLVM: VersionRequirements [
371 # INVALID-NAME-LLVM-NEXT: Dependency {
372 # INVALID-NAME-LLVM-NEXT: Version: 1
373 # INVALID-NAME-LLVM-NEXT: Count: 1
374 # INVALID-NAME-LLVM-NEXT: FileName: foo
375 # INVALID-NAME-LLVM-NEXT: Entries [
376 # INVALID-NAME-LLVM-NEXT: Entry {
377 # INVALID-NAME-LLVM-NEXT: Hash: 0
378 # INVALID-NAME-LLVM-NEXT: Flags [ (0x0)
379 # INVALID-NAME-LLVM-NEXT: ]
380 # INVALID-NAME-LLVM-NEXT: Index: 0
381 # INVALID-NAME-LLVM-NEXT: Name: foo
382 # INVALID-NAME-LLVM-NEXT: }
383 # INVALID-NAME-LLVM-NEXT: ]
384 # INVALID-NAME-LLVM-NEXT: }
385 # INVALID-NAME-LLVM-NEXT: ]
387 # INVALID-NAME-GNU: warning: '[[FILE]]': unable to get the name of SHT_GNU_verneed section with index 1: a section [index 1] has an invalid sh_name (0xffffffff) offset which goes past the end of the section name string table
388 # INVALID-NAME-GNU-NEXT: Version needs section '<?>' contains 1 entries:
389 # INVALID-NAME-GNU-NEXT: Addr: 0000000000000000 Offset: 0x000040 Link: 2 (.dynstr)
390 # INVALID-NAME-GNU-NEXT: 0x0000: Version: 1 File: foo Cnt: 1
391 # INVALID-NAME-GNU-NEXT: 0x0010: Name: foo Flags: none Version: 0
393 ## Check that llvm-readelf reports a warning when we are unable to read the name of
394 ## the section linked with the SHT_GNU_verneed section (usually ".dynstr").
396 # RUN: yaml2obj --docnum=6 %s -DDYNSTRNAME=0xFFFFFFFF -o %t.invalid.name2
397 # RUN: llvm-readobj -V %t.invalid.name2 2>&1 | \
398 # RUN: FileCheck %s -DFILE=%t.invalid.name2 --check-prefix=INVALID-NAME-LLVM --implicit-check-not=warning:
399 # RUN: llvm-readelf -V %t.invalid.name2 2>&1 | \
400 # RUN: FileCheck %s -DFILE=%t.invalid.name2 --check-prefix=INVALID-NAME2-GNU --implicit-check-not=warning:
402 # INVALID-NAME2-GNU: Version needs section '.gnu.version_r' contains 1 entries:
403 # INVALID-NAME2-GNU-NEXT: warning: '[[FILE]]': unable to get the name of SHT_STRTAB section with index 2: a section [index 2] has an invalid sh_name (0xffffffff) offset which goes past the end of the section name string table
404 # INVALID-NAME2-GNU-NEXT: Addr: 0000000000000000 Offset: 0x000040 Link: 2 (<?>)
405 # INVALID-NAME2-GNU-NEXT: 0x0000: Version: 1 File: foo Cnt: 1
406 # INVALID-NAME2-GNU-NEXT: 0x0010: Name: foo Flags: none Version: 0
408 ## Check that we report a warning when we can't read the content of the SHT_GNU_verneed section.
410 # RUN: yaml2obj --docnum=7 %s -o %t7
411 # RUN: llvm-readobj --sections -V %t7 2>&1 | FileCheck %s -DFILE=%t7 --check-prefix=INVALID-DATA
412 # RUN: llvm-readelf --sections -V %t7 2>&1 | FileCheck %s -DFILE=%t7 --check-prefix=INVALID-DATA
414 # INVALID-DATA: warning: '[[FILE]]': cannot read content of SHT_GNU_verneed section with index 1: section [index 1] has a sh_offset (0xffffffff) + sh_size (0x0) that is greater than the file size (0x228)
422 - Name: .gnu.version_r
423 Type: SHT_GNU_verneed
426 ## Triggers creation of the .dynstr.
430 ## Check that we report a warning when a SHT_GNU_verneed section contains a version dependency
431 ## that goes past the end of the section.
433 # RUN: yaml2obj --docnum=8 %s -o %t8
434 # RUN: llvm-readobj --sections -V %t8 2>&1 | FileCheck %s -DFILE=%t8 --check-prefix=DEP-PAST-END
435 # RUN: llvm-readelf --sections -V %t8 2>&1 | FileCheck %s -DFILE=%t8 --check-prefix=DEP-PAST-END
437 # DEP-PAST-END: warning: '[[FILE]]': invalid SHT_GNU_verneed section with index 1: version dependency 1 goes past the end of the section
445 - Name: .gnu.version_r
446 Type: SHT_GNU_verneed
460 ## Check we report a warning when a version dependency is not correctly aligned in memory.
462 # RUN: yaml2obj --docnum=9 %s -o %t9
463 # RUN: llvm-readobj --sections -V %t9 2>&1 | FileCheck %s -DFILE=%t9 --check-prefix=MISALIGNED-DEP
464 # RUN: llvm-readelf --sections -V %t9 2>&1 | FileCheck %s -DFILE=%t9 --check-prefix=MISALIGNED-DEP
466 # MISALIGNED-DEP: warning: '[[FILE]]': invalid SHT_GNU_verneed section with index 1: found a misaligned version dependency entry at offset 0x0
476 - Name: .gnu.version_r
477 Type: SHT_GNU_verneed
491 ## Check that we report a warning when a SHT_GNU_verneed section contains a dependency definition
492 ## that refers to an auxiliary entry that goes past the end of the section.
494 # RUN: yaml2obj --docnum=10 %s -o %t10
495 # RUN: llvm-readobj --sections -V %t10 2>&1 | FileCheck %s -DFILE=%t10 --check-prefix=AUX-PAST-END
496 # RUN: llvm-readelf --sections -V %t10 2>&1 | FileCheck %s -DFILE=%t10 --check-prefix=AUX-PAST-END
498 # AUX-PAST-END: warning: '[[FILE]]': invalid SHT_GNU_verneed section with index 1: version dependency 1 refers to an auxiliary entry that goes past the end of the section
506 - Name: .gnu.version_r
507 Type: SHT_GNU_verneed
521 ## Check we report a warning when an auxiliary entry is not correctly aligned in memory.
523 # RUN: yaml2obj %s --docnum=11 -o %t11
524 # RUN: llvm-readobj -V %t11 2>&1 | FileCheck %s --check-prefix=MISALIGNED-AUX -DFILE=%t11
525 # RUN: llvm-readelf -V %t11 2>&1 | FileCheck %s --check-prefix=MISALIGNED-AUX -DFILE=%t11
527 # MISALIGNED-AUX: warning: '[[FILE]]': invalid SHT_GNU_verneed section with index 1: found a misaligned auxiliary entry at offset 0x11
535 - Name: .gnu.version_r
536 Type: SHT_GNU_verneed
539 ## The byte offset to the auxiliary entry is 0x11, i.e. it is not correctly aligned in memory.
540 Content: "0100010001000000110000000000000000000000"
544 ## Check how we handle the case when a dependency definition entry has an unsupported version.
546 # RUN: yaml2obj %s --docnum=12 -o %t12
547 # RUN: llvm-readobj -V %t12 2>&1 | FileCheck %s --check-prefix=UNSUPPORTED-VERSION -DFILE=%t12
548 # RUN: llvm-readelf -V %t12 2>&1 | FileCheck %s --check-prefix=UNSUPPORTED-VERSION -DFILE=%t12
550 # UNSUPPORTED-VERSION: warning: '[[FILE]]': unable to dump SHT_GNU_verneed section with index 1: version 65278 is not yet supported
558 - Name: .gnu.version_r
559 Type: SHT_GNU_verneed
572 ## In this case SHT_GNU_verneed is linked to a custom dynamic string table, which is not
573 ## called ".dynstr". Check we handle this case properly.
575 # RUN: yaml2obj --docnum=13 %s -o %t13
576 # RUN: llvm-readelf -V %t13 2>&1 | FileCheck %s -DFILE=%t13 --check-prefix=GNU-CUSTOM-DYNSTR
577 # RUN: llvm-readobj -V %t13 2>&1 | FileCheck %s -DFILE=%t13 --check-prefix=LLVM-CUSTOM-DYNSTR
579 # GNU-CUSTOM-DYNSTR: Version symbols section '.gnu.version' contains 2 entries:
580 # GNU-CUSTOM-DYNSTR-NEXT: Addr: 0000000000000000 Offset: 0x000040 Link: 4 (.dynsym)
581 # GNU-CUSTOM-DYNSTR-NEXT: 000: 0 (*local*) 2 (bcdefghij)
582 # GNU-CUSTOM-DYNSTR: Version needs section '.gnu.version_r' contains 1 entries:
583 # GNU-CUSTOM-DYNSTR-NEXT: Addr: 0000000000000004 Offset: 0x000044 Link: 3 (.custom.dynstr)
584 # GNU-CUSTOM-DYNSTR-NEXT: 0x0000: Version: 1 File: j Cnt: 1
585 # GNU-CUSTOM-DYNSTR-NEXT: 0x0010: Name: bcdefghij Flags: none Version: 2
587 # LLVM-CUSTOM-DYNSTR: VersionSymbols [
588 # LLVM-CUSTOM-DYNSTR: Symbol {
589 # LLVM-CUSTOM-DYNSTR: Version: 2
590 # LLVM-CUSTOM-DYNSTR-NEXT: Name: foo@bcdefghij
592 # LLVM-CUSTOM-DYNSTR: VersionRequirements [
593 # LLVM-CUSTOM-DYNSTR: Dependency {
594 # LLVM-CUSTOM-DYNSTR: Entries [
595 # LLVM-CUSTOM-DYNSTR: Entry {
596 # LLVM-CUSTOM-DYNSTR: Index: 2
597 # LLVM-CUSTOM-DYNSTR-NEXT: Name: bcdefghij
609 - Name: .gnu.version_r
610 Type: SHT_GNU_verneed
622 - Name: .custom.dynstr
624 Content: "6162636465666768696a00" ## 'a','b','c','d','e','f','g','h','i','j',NIL