Recommit "rL366894: [yaml2obj] - Allow custom fields for the SHT_UNDEF sections."
[llvm-complete.git] / test / tools / yaml2obj / verdef-section.yaml
blob582b801926644e4b35dcdda974a7cffad61c3ed9
1 # RUN: yaml2obj %s -o %t
2 # RUN: llvm-readobj -V %t | FileCheck %s
4 # Check we are able to handle the SHT_GNU_verdef sections.
6 # CHECK:      SHT_GNU_verdef {
7 # CHECK-NEXT:   Definition {
8 # CHECK-NEXT:     Version: 1
9 # CHECK-NEXT:     Flags: Base
10 # CHECK-NEXT:     Index: 1
11 # CHECK-NEXT:     Hash: 170240160
12 # CHECK-NEXT:     Name: dso.so.0
13 # CHECK-NEXT:   }
14 # CHECK-NEXT:   Definition {
15 # CHECK-NEXT:     Version: 1
16 # CHECK-NEXT:     Flags: Weak
17 # CHECK-NEXT:     Index: 2
18 # CHECK-NEXT:     Hash: 108387921
19 # CHECK-NEXT:     Name: VERSION_1
20 # CHECK-NEXT:   }
21 # CHECK-NEXT:   Definition {
22 # CHECK-NEXT:     Version: 1
23 # CHECK-NEXT:     Flags: 0x3
24 # CHECK-NEXT:     Index: 3
25 # CHECK-NEXT:     Hash: 108387922
26 # CHECK-NEXT:     Name: VERSION_2
27 # CHECK-NEXT:     Predecessor: VERSION_3
28 # CHECK-NEXT:   }
29 # CHECK-NEXT: }
31 --- !ELF
32 FileHeader:
33   Class:           ELFCLASS64
34   Data:            ELFDATA2LSB
35   Type:            ET_DYN
36   Machine:         EM_X86_64
37   Entry:           0x0000000000001000
38 Sections:
39   - Name:            .gnu.version_d
40     Type:            SHT_GNU_verdef
41     Flags:           [ SHF_ALLOC ]
42     Address:         0x0000000000000230
43     Link:            .dynstr
44     AddressAlign:    0x0000000000000004
45     Info:            0x0000000000000003
46     Entries:
47       - Version:         1
48         Flags:           1
49         VersionNdx:      1
50         Hash:            170240160
51         Names:
52           - dso.so.0
53       - Version:         1
54         Flags:           2
55         VersionNdx:      2
56         Hash:            108387921
57         Names:
58           - VERSION_1
59       - Version:         1
60         Flags:           3
61         VersionNdx:      3
62         Hash:            108387922
63         Names:
64           - VERSION_2
65           - VERSION_3
66 DynamicSymbols:
67   - Name:    foo
68     Binding: STB_GLOBAL
69 ...