1 ## Check we are able to produce a valid SHT_GNU_versym
2 ## section from its description.
4 # RUN: yaml2obj --docnum=1 %s -o %t1
5 # RUN: llvm-readobj -V %t1 | FileCheck %s
7 # CHECK: Version symbols {
8 # CHECK-NEXT: Section Name: .gnu.version
9 # CHECK-NEXT: Address: 0x200210
10 # CHECK-NEXT: Offset: 0x240
12 # CHECK-NEXT: Symbols [
13 # CHECK-NEXT: Symbol {
14 # CHECK-NEXT: Version: 0
17 # CHECK-NEXT: Symbol {
18 # CHECK-NEXT: Version: 3
19 # CHECK-NEXT: Name: f1@v1
21 # CHECK-NEXT: Symbol {
22 # CHECK-NEXT: Version: 4
23 # CHECK-NEXT: Name: f2@v2
27 # CHECK-NEXT: SHT_GNU_verdef {
29 # CHECK-NEXT: SHT_GNU_verneed {
30 # CHECK-NEXT: Dependency {
31 # CHECK-NEXT: Version: 1
32 # CHECK-NEXT: Count: 2
33 # CHECK-NEXT: FileName: dso.so.0
34 # CHECK-NEXT: Entries [
36 # CHECK-NEXT: Hash: 1937
37 # CHECK-NEXT: Flags: 0x0
38 # CHECK-NEXT: Index: 3
39 # CHECK-NEXT: Name: v1
42 # CHECK-NEXT: Hash: 1938
43 # CHECK-NEXT: Flags: 0x0
44 # CHECK-NEXT: Index: 4
45 # CHECK-NEXT: Name: v2
57 Entry: 0x0000000000201000
62 Address: 0x0000000000200210
64 AddressAlign: 0x0000000000000002
65 EntSize: 0x0000000000000002
67 - Name: .gnu.version_r
70 Address: 0x0000000000200250
72 AddressAlign: 0x0000000000000004
73 Info: 0x0000000000000001
93 ## Check we are able to set custom sh_entsize field for SHT_GNU_versym section.
95 # RUN: yaml2obj --docnum=2 %s -o %t2
96 # RUN: llvm-readelf -S %t2 | FileCheck %s --check-prefix=ENTSIZE
98 # ENTSIZE: Section Headers:
99 # ENTSIZE: [Nr] Name Type Address Off Size ES
100 # ENTSIZE: [ 1] .gnu.version VERSYM 0000000000000000 000180 000000 03
106 OSABI: ELFOSABI_FREEBSD
112 EntSize: 0x0000000000000003