Revert r354244 "[DAGCombiner] Eliminate dead stores to stack."
[llvm-complete.git] / test / tools / llvm-readobj / elf-versioninfo.test
blob82029cf82fd3e3691c9bd3e11c6543511cd3bf94
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
13 CHECK-NEXT:   Link: 1
14 CHECK-NEXT:   Symbols [
15 CHECK-NEXT:     Symbol {
16 CHECK-NEXT:       Version: 0
17 CHECK-NEXT:       Name: {{$}}
18 CHECK-NEXT:     }
19 CHECK-NEXT:     Symbol {
20 CHECK-NEXT:       Version: 1
21 CHECK-NEXT:       Name: _end{{$}}
22 CHECK-NEXT:     }
23 CHECK-NEXT:     Symbol {
24 CHECK-NEXT:       Version: 1
25 CHECK-NEXT:       Name: _edata{{$}}
26 CHECK-NEXT:     }
27 CHECK-NEXT:     Symbol {
28 CHECK-NEXT:       Version: 3
29 CHECK-NEXT:       Name: goo@@VERSION2
30 CHECK-NEXT:     }
31 CHECK-NEXT:     Symbol {
32 CHECK-NEXT:       Version: 1
33 CHECK-NEXT:       Name: __bss_start{{$}}
34 CHECK-NEXT:     }
35 CHECK-NEXT:     Symbol {
36 CHECK-NEXT:       Version: 2
37 CHECK-NEXT:       Name: foo@@VERSION1
38 CHECK-NEXT:     }
39 CHECK-NEXT:     Symbol {
40 CHECK-NEXT:       Version: 2
41 CHECK-NEXT:       Name: VERSION1@@VERSION1
42 CHECK-NEXT:     }
43 CHECK-NEXT:     Symbol {
44 CHECK-NEXT:       Version: 3
45 CHECK-NEXT:       Name: VERSION2@@VERSION2
46 CHECK-NEXT:     }
47 CHECK-NEXT:   ]
48 CHECK-NEXT: }
50 CHECK:      SHT_GNU_verdef {
51 CHECK-NEXT:   Definition {
52 CHECK-NEXT:     Version: 1
53 CHECK-NEXT:     Flags: Base (0x1)
54 CHECK-NEXT:     Index: 1
55 CHECK-NEXT:     Hash: 430712
56 CHECK-NEXT:     Name: blah
57 CHECK-NEXT:   }
58 CHECK-NEXT:   Definition {
59 CHECK-NEXT:     Version: 1
60 CHECK-NEXT:     Flags: 0x0
61 CHECK-NEXT:     Index: 2
62 CHECK-NEXT:     Hash: 175630257
63 CHECK-NEXT:     Name: VERSION1
64 CHECK-NEXT:   }
65 CHECK-NEXT:   Definition {
66 CHECK-NEXT:     Version: 1
67 CHECK-NEXT:     Flags: 0x0
68 CHECK-NEXT:     Index: 3
69 CHECK-NEXT:     Hash: 175630258
70 CHECK-NEXT:     Name: VERSION2
71 CHECK-NEXT:     Predecessor: VERSION1
72 CHECK-NEXT:   }
73 CHECK-NEXT: }
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
82 VERNEED-NEXT:     Entry {
83 VERNEED-NEXT:       Hash: 1938
84 VERNEED-NEXT:       Flags: 0x0
85 VERNEED-NEXT:       Index: 3
86 VERNEED-NEXT:       Name: v2
87 VERNEED-NEXT:     }
88 VERNEED-NEXT:     Entry {
89 VERNEED-NEXT:       Hash: 1939
90 VERNEED-NEXT:       Flags: 0x0
91 VERNEED-NEXT:       Index: 2
92 VERNEED-NEXT:       Name: v3
93 VERNEED-NEXT:     }
94 VERNEED-NEXT:   }
95 VERNEED-NEXT:   Dependency {
96 VERNEED-NEXT:     Version: 1
97 VERNEED-NEXT:     Count: 1
98 VERNEED-NEXT:     FileName: verneed2.so.0
99 VERNEED-NEXT:     Entry {
100 VERNEED-NEXT:       Hash: 1937
101 VERNEED-NEXT:       Flags: 0x0
102 VERNEED-NEXT:       Index: 4
103 VERNEED-NEXT:       Name: v1
104 VERNEED-NEXT:     }
105 VERNEED-NEXT:   }
106 VERNEED-NEXT: }