Follow up to d0858bffa11, add missing REQUIRES x86
[llvm-project.git] / llvm / test / tools / obj2yaml / ELF / verneed-section.yaml
blobdbc507794ca8e3b38eafd2a4e0f20caee8f15ea5
1 ## Check that we are able to yamalize the SHT_GNU_verneed section.
2 ## Check we don't dump the `Info` field when its value
3 ## is equal to the number of version dependencies.
5 # RUN: yaml2obj %s -o %t
6 # RUN: obj2yaml %t | FileCheck %s
8 # CHECK:      - Name:            .gnu.version_r
9 # CHECK-NEXT:   Type:            SHT_GNU_verneed
10 # CHECK-NEXT:   Flags:           [ SHF_ALLOC ]
11 # CHECK-NEXT:   Address:         0x200250
12 # CHECK-NEXT:   Link:            .dynstr
13 # CHECK-NEXT:   AddressAlign:    0x4
14 # INFO-NEXT:    Info:            0x3
15 # CHECK-NEXT:   Dependencies:
16 # CHECK-NEXT:     - Version:         1
17 # CHECK-NEXT:       File:            dso.so.0
18 # CHECK-NEXT:       Entries:
19 # CHECK-NEXT:         - Name:            v1
20 # CHECK-NEXT:           Hash:            1937
21 # CHECK-NEXT:           Flags:           10
22 # CHECK-NEXT:           Other:           3
23 # CHECK-NEXT:         - Name:            v2
24 # CHECK-NEXT:           Hash:            1938
25 # CHECK-NEXT:           Flags:           11
26 # CHECK-NEXT:           Other:           4
27 # CHECK-NEXT:     - Version:         1
28 # CHECK-NEXT:       File:            dso.so.1
29 # CHECK-NEXT:       Entries:
30 # CHECK-NEXT:         - Name:            v3
31 # CHECK-NEXT:           Hash:            1939
32 # CHECK-NEXT:           Flags:           12
33 # CHECK-NEXT:           Other:           2
35 --- !ELF
36 FileHeader:
37   Class: ELFCLASS64
38   Data:  ELFDATA2LSB
39   Type:  ET_EXEC
40   Entry: 0x0000000000201000
41 Sections:
42   - Name:         .gnu.version_r
43     Type:         SHT_GNU_verneed
44     Flags:        [ SHF_ALLOC ]
45     Address:      0x200250
46     AddressAlign: 4
47     Info:         [[INFO=<none>]]
48     Dependencies:
49       - Version:         1
50         File:            dso.so.0
51         Entries:
52           - Name:            v1
53             Hash:            1937
54             Flags:           10
55             Other:           3
56           - Name:            v2
57             Hash:            1938
58             Flags:           11
59             Other:           4
60       - Version:         1
61         File:            dso.so.1
62         Entries:
63           - Name:            v3
64             Hash:            1939
65             Flags:           12
66             Other:           2
67 DynamicSymbols:
68   - Name:    f1
69     Binding: STB_GLOBAL
71 ## Check we dump the `Info` field when its value
72 ## is not equal to the number of version dependencies.
74 # RUN: yaml2obj %s -DINFO=0x3 -o %t.info
75 # RUN: obj2yaml %t.info | FileCheck %s --check-prefixes=CHECK,INFO