1@ RUN: llvm-mc -triple armv7-eabi -filetype obj -o - %s | llvm-readobj -t \
2@ RUN:   | FileCheck %s
3
4@ RUN: llvm-mc -triple armv7-eabi -filetype asm -o - %s \
5@ RUN:   | FileCheck --check-prefix=ASM %s
6
7	.syntax unified
8
9	.arm
10
11	.type arm_func,%function
12arm_func:
13	nop
14
15	.thumb_set alias_arm_func, arm_func
16
17        alias_arm_func2 = alias_arm_func
18        alias_arm_func3 = alias_arm_func2
19
20@ ASM: .thumb_set alias_arm_func, arm_func
21
22	.thumb
23
24	.type thumb_func,%function
25	.thumb_func
26thumb_func:
27	nop
28
29	.thumb_set alias_thumb_func, thumb_func
30
31	.thumb_set seedless, 0x5eed1e55
32	.thumb_set eggsalad, seedless + 0x87788358
33	.thumb_set faceless, ~eggsalad + 0xe133c002
34
35	.thumb_set alias_undefined_data, badblood
36
37	.data
38
39	.type badblood,%object
40badblood:
41	.long 0xbadb100d
42
43	.type bedazzle,%object
44bedazzle:
45	.long 0xbeda221e
46
47	.text
48	.thumb
49
50	.thumb_set alias_defined_data, bedazzle
51
52	.type alpha,%function
53alpha:
54	nop
55
56        .type beta,%function
57
58	.thumb_set beta, alpha
59
60@ CHECK: Symbol {
61@ CHECK:   Name: alias_arm_func
62@ CHECK:   Value: 0x1
63@ CHECK:   Type: Function
64@ CHECK: }
65
66@ CHECK: Symbol {
67@ CHECK:   Name: alias_arm_func2
68@ CHECK:   Value: 0x1
69@ CHECK:   Type: Function
70@ CHECK: }
71
72@ CHECK: Symbol {
73@ CHECK:   Name: alias_arm_func3
74@ CHECK:   Value: 0x1
75@ CHECK:   Type: Function
76@ CHECK: }
77
78@ CHECK: Symbol {
79@ CHECK:   Name: alias_defined_data
80@ CHECK:   Value: 0x5
81@ CHECK:   Type: Function
82@ CHECK: }
83
84@ CHECK: Symbol {
85@ CHECK:   Name: alias_thumb_func
86@ CHECK:   Value: 0x5
87@ CHECK:   Type: Function
88@ CHECK: }
89
90@ CHECK: Symbol {
91@ CHECK:   Name: alias_undefined_data
92@ CHECK:   Value: 0x0
93@ CHECK:   Type: Object
94@ CHECK: }
95
96@ CHECK: Symbol {
97@ CHECK:   Name: alpha
98@ CHECK:   Value: 0x7
99@ CHECK:   Type: Function
100@ CHECK: }
101
102@ CHECK: Symbol {
103@ CHECK:   Name: arm_func
104@ CHECK:   Value: 0x0
105@ CHECK:   Type: Function
106@ CHECK: }
107
108@ CHECK:      Symbol {
109@ CHECK:        Name: badblood
110@ CHECK-NEXT:   Value: 0x0
111@ CHECK-NEXT:   Size: 0
112@ CHECK-NEXT:   Binding: Local
113@ CHECK-NEXT:   Type: Object
114@ CHECK-NEXT:   Other: 0
115@ CHECK-NEXT:   Section: .data
116@ CHECK-NEXT: }
117
118@ CHECK: Symbol {
119@ CHECK:   Name: bedazzle
120@ CHECK:   Value: 0x4
121@ CHECK:   Type: Object
122@ CHECK: }
123
124@ CHECK: Symbol {
125@ CHECK:   Name: beta
126@ CHECK:   Value: 0x7
127@ CHECK:   Type: Function
128@ CHECK: }
129
130@ CHECK: Symbol {
131@ CHECK:   Name: eggsalad
132@ CHECK:   Value: 0xE665A1AD
133@ CHECK:   Type: Function
134@ CHECK: }
135
136@ CHECK: Symbol {
137@ CHECK:   Name: faceless
138@ CHECK:   Value: 0xFACE1E55
139@ CHECK:   Type: Function
140@ CHECK: }
141
142@ CHECK: Symbol {
143@ CHECK:   Name: seedless
144@ CHECK:   Value: 0x5EED1E55
145@ CHECK:   Type: Function
146@ CHECK: }
147
148@ CHECK: Symbol {
149@ CHECK:   Name: thumb_func
150@ CHECK:   Value: 0x5
151@ CHECK:   Type: Function
152@ CHECK: }
153