1 // Test that llvm-readobj dumps version info tags correctly.
3 RUN: llvm-readobj -dynamic-table -V %p/Inputs/verdef.elf-x86-64 | FileCheck %s
5 CHECK: 0x000000006FFFFFF0 VERSYM 0x24C
6 CHECK: 0x000000006FFFFFFC VERDEF 0x25C
7 CHECK: 0x000000006FFFFFFD VERDEFNUM 3
9 CHECK: Version symbols {
10 CHECK-NEXT: Section Name: .gnu.version (20)
11 CHECK-NEXT: Address: 0x24C
12 CHECK-NEXT: Offset: 0x24C
16 CHECK-NEXT: Version: 0
17 CHECK-NEXT: Name: {{$}}
20 CHECK-NEXT: Version: 1
21 CHECK-NEXT: Name: _end{{$}}
24 CHECK-NEXT: Version: 1
25 CHECK-NEXT: Name: _edata{{$}}
28 CHECK-NEXT: Version: 3
29 CHECK-NEXT: Name: goo@@VERSION2
32 CHECK-NEXT: Version: 1
33 CHECK-NEXT: Name: __bss_start{{$}}
36 CHECK-NEXT: Version: 2
37 CHECK-NEXT: Name: foo@@VERSION1
40 CHECK-NEXT: Version: 2
41 CHECK-NEXT: Name: VERSION1@@VERSION1
44 CHECK-NEXT: Version: 3
45 CHECK-NEXT: Name: VERSION2@@VERSION2
50 CHECK: SHT_GNU_verdef {
51 CHECK-NEXT: Definition {
52 CHECK-NEXT: Version: 1
53 CHECK-NEXT: Flags: Base (0x1)
55 CHECK-NEXT: Hash: 430712
56 CHECK-NEXT: Name: blah
58 CHECK-NEXT: Definition {
59 CHECK-NEXT: Version: 1
60 CHECK-NEXT: Flags: 0x0
62 CHECK-NEXT: Hash: 175630257
63 CHECK-NEXT: Name: VERSION1
65 CHECK-NEXT: Definition {
66 CHECK-NEXT: Version: 1
67 CHECK-NEXT: Flags: 0x0
69 CHECK-NEXT: Hash: 175630258
70 CHECK-NEXT: Name: VERSION2
71 CHECK-NEXT: Predecessor: VERSION1
75 RUN: llvm-readobj -V %p/Inputs/verneed.elf-x86-64 | FileCheck %s --check-prefix=VERNEED
77 VERNEED: SHT_GNU_verneed {
78 VERNEED-NEXT: Dependency {
79 VERNEED-NEXT: Version: 1
80 VERNEED-NEXT: Count: 2
81 VERNEED-NEXT: FileName: verneed1.so.0
83 VERNEED-NEXT: Hash: 1938
84 VERNEED-NEXT: Flags: 0x0
85 VERNEED-NEXT: Index: 3
86 VERNEED-NEXT: Name: v2
89 VERNEED-NEXT: Hash: 1939
90 VERNEED-NEXT: Flags: 0x0
91 VERNEED-NEXT: Index: 2
92 VERNEED-NEXT: Name: v3
95 VERNEED-NEXT: Dependency {
96 VERNEED-NEXT: Version: 1
97 VERNEED-NEXT: Count: 1
98 VERNEED-NEXT: FileName: verneed2.so.0
100 VERNEED-NEXT: Hash: 1937
101 VERNEED-NEXT: Flags: 0x0
102 VERNEED-NEXT: Index: 4
103 VERNEED-NEXT: Name: v1