Recommit "rL366894: [yaml2obj] - Allow custom fields for the SHT_UNDEF sections."
[llvm-complete.git] / test / tools / llvm-readobj / elf-invalid-versioning.test
bloba1acc9a03e3e8cbf283195fa3a6accd283b41202
1 # RUN: yaml2obj %s -o %t
2 # RUN: llvm-readelf -V %t | FileCheck %s --check-prefix=INVALID
4 # INVALID:      Version symbols section '.gnu.version' contains 2 entries:
5 # INVALID-NEXT:  Addr: 0000000000200210  Offset: 0x000240  Link: 6 (.dynsym)
6 # INVALID-NEXT:   000:   0 (*local*)       3 (*invalid*)
8 --- !ELF
9 FileHeader:
10   Class:             ELFCLASS64
11   Data:              ELFDATA2LSB
12   Type:              ET_EXEC
13   Machine:           EM_X86_64
14   Entry:             0x0000000000201000
15 Sections:
16   - Name:            .gnu.version
17     Type:            SHT_GNU_versym
18     Flags:           [ SHF_ALLOC ]
19     Address:         0x0000000000200210
20     Link:            .dynsym
21     AddressAlign:    0x0000000000000002
22     EntSize:         0x0000000000000002
23     Entries:         [ 0, 3 ]
24   - Name:            .gnu.version_r
25     Type:            SHT_GNU_verneed
26     Flags:           [ SHF_ALLOC ]
27     Address:         0x0000000000200250
28     Link:            .dynstr
29     AddressAlign:    0x0000000000000004
30     Info:            0x0000000000000001
31     Dependencies:
32       - Version:     1
33         File:        somefile
34         Entries:
35           - Name:    ''         # invalid name
36             Hash:    1937
37             Flags:   233
38             Other:   3
39 DynamicSymbols:
40   - Name:          f
41     Binding:       STB_GLOBAL
42 ...