[InstCombine] Signed saturation tests. NFC
[llvm-complete.git] / test / MC / ELF / alias.s
blobc125de3467c09755a0426b4f2f2a389b6ba2daaf
1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj --symbols | FileCheck %s
3 foo:
4 bar = foo
6 .globl foo2
7 foo2 = bar2
9 foo3:
10 .globl bar3
11 bar3 = foo3
14 // Test that bar4 and bar 5 are also functions and have the same value as foo4.
15 .byte 0
16 .type foo4,@function
17 foo4:
18 bar4 = foo4
19 bar5 = bar4
21 .long foo2
23 // Test that bar6 is a function that doesn't have the same value as foo4.
24 bar6 = bar5
25 bar6:
27 // Test that indirect local aliases do not appear as symbols.
28 .data
29 .Llocal:
31 .text
32 leaq .Llocal1(%rip), %rdi
33 .Llocal1 = .Llocal2
34 .Llocal2 = .Llocal
36 // CHECK: Symbols [
37 // CHECK-NEXT: Symbol {
38 // CHECK-NEXT: Name: (0)
39 // CHECK-NEXT: Value: 0x0
40 // CHECK-NEXT: Size: 0
41 // CHECK-NEXT: Binding: Local (0x0)
42 // CHECK-NEXT: Type: None (0x0)
43 // CHECK-NEXT: Other: 0
44 // CHECK-NEXT: Section: Undefined (0x0)
45 // CHECK-NEXT: }
46 // CHECK-NEXT: Symbol {
47 // CHECK-NEXT: Name: bar
48 // CHECK-NEXT: Value: 0x0
49 // CHECK-NEXT: Size: 0
50 // CHECK-NEXT: Binding: Local
51 // CHECK-NEXT: Type: None
52 // CHECK-NEXT: Other: 0
53 // CHECK-NEXT: Section: .text
54 // CHECK-NEXT: }
55 // CHECK-NEXT: Symbol {
56 // CHECK-NEXT: Name: bar4
57 // CHECK-NEXT: Value: 0x1
58 // CHECK-NEXT: Size: 0
59 // CHECK-NEXT: Binding: Local
60 // CHECK-NEXT: Type: Function
61 // CHECK-NEXT: Other: 0
62 // CHECK-NEXT: Section: .text
63 // CHECK-NEXT: }
64 // CHECK-NEXT: Symbol {
65 // CHECK-NEXT: Name: bar5
66 // CHECK-NEXT: Value: 0x1
67 // CHECK-NEXT: Size: 0
68 // CHECK-NEXT: Binding: Local
69 // CHECK-NEXT: Type: Function
70 // CHECK-NEXT: Other: 0
71 // CHECK-NEXT: Section: .text
72 // CHECK-NEXT: }
73 // CHECK-NEXT: Symbol {
74 // CHECK-NEXT: Name: bar6
75 // CHECK-NEXT: Value: 0x5
76 // CHECK-NEXT: Size: 0
77 // CHECK-NEXT: Binding: Local
78 // CHECK-NEXT: Type: None
79 // CHECK-NEXT: Other: 0
80 // CHECK-NEXT: Section: .text
81 // CHECK-NEXT: }
82 // CHECK-NEXT: Symbol {
83 // CHECK-NEXT: Name: foo
84 // CHECK-NEXT: Value: 0x0
85 // CHECK-NEXT: Size: 0
86 // CHECK-NEXT: Binding: Local
87 // CHECK-NEXT: Type: None
88 // CHECK-NEXT: Other: 0
89 // CHECK-NEXT: Section: .text
90 // CHECK-NEXT: }
91 // CHECK-NEXT: Symbol {
92 // CHECK-NEXT: Name: foo3
93 // CHECK-NEXT: Value: 0x0
94 // CHECK-NEXT: Size: 0
95 // CHECK-NEXT: Binding: Local
96 // CHECK-NEXT: Type: None
97 // CHECK-NEXT: Other: 0
98 // CHECK-NEXT: Section: .text
99 // CHECK-NEXT: }
100 // CHECK-NEXT: Symbol {
101 // CHECK-NEXT: Name: foo4
102 // CHECK-NEXT: Value: 0x1
103 // CHECK-NEXT: Size: 0
104 // CHECK-NEXT: Binding: Local
105 // CHECK-NEXT: Type: Function
106 // CHECK-NEXT: Other: 0
107 // CHECK-NEXT: Section: .text
108 // CHECK-NEXT: }
109 // CHECK-NEXT: Symbol {
110 // CHECK-NEXT: Name: .data (0)
111 // CHECK-NOT: Symbol {
112 // CHECK: }
113 // CHECK-NEXT: Symbol {
114 // CHECK-NEXT: Name: bar2
115 // CHECK-NEXT: Value: 0x0
116 // CHECK-NEXT: Size: 0
117 // CHECK-NEXT: Binding: Global
118 // CHECK-NEXT: Type: None
119 // CHECK-NEXT: Other: 0
120 // CHECK-NEXT: Section: Undefined (0x0)
121 // CHECK-NEXT: }
122 // CHECK-NEXT: Symbol {
123 // CHECK-NEXT: Name: bar3
124 // CHECK-NEXT: Value: 0x0
125 // CHECK-NEXT: Size: 0
126 // CHECK-NEXT: Binding: Global
127 // CHECK-NEXT: Type: None
128 // CHECK-NEXT: Other: 0
129 // CHECK-NEXT: Section: .text
130 // CHECK-NEXT: }
131 // CHECK-NEXT: ]