1 ## Check how we dump SHT_GNU_verdef sections.
2 ## Check we don't dump the `Info` field when its value is equal
3 ## to the number of version definitions.
5 # RUN: yaml2obj %s -o %t
6 # RUN: obj2yaml %t | FileCheck %s
8 # CHECK: - Name: .gnu.version_d
9 # CHECK-NEXT: Type: SHT_GNU_verdef
10 # CHECK-NEXT: Flags: [ SHF_ALLOC ]
11 # CHECK-NEXT: Address: 0x230
12 # CHECK-NEXT: Link: .dynstr
13 # CHECK-NEXT: AddressAlign: 0x4
14 # INFO-NEXT: Info: 0x4
15 # CHECK-NEXT: Entries:
16 # CHECK-NEXT: - Names:
17 # CHECK-NEXT: - VERSION_0
18 # CHECK-NEXT: - Flags: 2
19 # CHECK-NEXT: VersionNdx: 2
20 # CHECK-NEXT: Hash: 108387921
22 # CHECK-NEXT: - VERSION_1
23 # CHECK-NEXT: - Flags: 3
24 # CHECK-NEXT: VersionNdx: 3
25 # CHECK-NEXT: Hash: 108387922
27 # CHECK-NEXT: - VERSION_2
28 # CHECK-NEXT: - VERSION_3
29 # CHECK-NEXT: - VERSION_4
38 - Name: .gnu.version_d
45 ## An entry that has all fields explicitly set to their default values.
46 ## Used to check that we don't dump them.
47 - Version: [[VERSION=1]]
53 ## An entry with arbitrary values.
59 ## Another entry with arbitrary values and version predecessors.
67 ## Needed to emit the .dynstr section.
70 ## Check we dump the `Info` field when its value is not equal
71 ## to the number of version definitions.
73 # RUN: yaml2obj %s -DINFO=0x4 -o %t.info
74 # RUN: obj2yaml %t.info | FileCheck %s --check-prefixes=CHECK,INFO
76 ## Document that we are not able to dump a version definition which
77 ## has a version revision (vd_version) that is not equal to 1.
79 # RUN: yaml2obj %s -DVERSION=2 -o %t.version
80 # RUN: not obj2yaml %t.version 2>&1 | \
81 # RUN: FileCheck %s -DFILE=%t.version --check-prefix=VERSION-ERR
83 # VERSION-ERR: Error reading file: [[FILE]]: invalid SHT_GNU_verdef section version: 2