arm-attributes.s
6.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
// REQUIRES: arm
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %S/Inputs/arm-attributes1.s -o %t1.o
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t2.o
// RUN: ld.lld %t1.o %t2.o -o %t
// RUN: llvm-readobj --arch-specific %t | FileCheck %s
// RUN: ld.lld %t1.o %t2.o -shared -o %t2
// RUN: llvm-readobj --arch-specific %t2 | FileCheck %s
// RUN: ld.lld %t1.o %t2.o -r -o %t3
// RUN: llvm-readobj --arch-specific %t3 | FileCheck %s
// Check that we retain only 1 SHT_ARM_ATTRIBUTES section. At present we do not
// try and merge or use the contents of SHT_ARM_ATTRIBUTES sections. We just
// pass the first one through.
.text
.syntax unified
.eabi_attribute 67, "2.09" @ Tag_conformance
.cpu cortex-a8
.eabi_attribute 6, 10 @ Tag_CPU_arch
.eabi_attribute 7, 65 @ Tag_CPU_arch_profile
.eabi_attribute 8, 1 @ Tag_ARM_ISA_use
.eabi_attribute 9, 2 @ Tag_THUMB_ISA_use
.fpu neon
.eabi_attribute 15, 1 @ Tag_ABI_PCS_RW_data
.eabi_attribute 16, 1 @ Tag_ABI_PCS_RO_data
.eabi_attribute 17, 2 @ Tag_ABI_PCS_GOT_use
.eabi_attribute 20, 1 @ Tag_ABI_FP_denormal
.eabi_attribute 21, 1 @ Tag_ABI_FP_exceptions
.eabi_attribute 23, 3 @ Tag_ABI_FP_number_model
.eabi_attribute 34, 1 @ Tag_CPU_unaligned_access
.eabi_attribute 24, 1 @ Tag_ABI_align_needed
.eabi_attribute 25, 1 @ Tag_ABI_align_preserved
.eabi_attribute 38, 1 @ Tag_ABI_FP_16bit_format
.eabi_attribute 18, 4 @ Tag_ABI_PCS_wchar_t
.eabi_attribute 26, 2 @ Tag_ABI_enum_size
.eabi_attribute 14, 0 @ Tag_ABI_PCS_R9_use
.eabi_attribute 68, 1 @ Tag_Virtualization_use
.globl _start
.p2align 2
.type _start,%function
_start:
.globl func
bl func
bx lr
// CHECK: BuildAttributes {
// CHECK-NEXT: FormatVersion: 0x41
// CHECK-NEXT: Section 1 {
// CHECK-NEXT: SectionLength: 72
// CHECK-NEXT: Vendor: aeabi
// CHECK-NEXT: Tag: Tag_File (0x1)
// CHECK-NEXT: Size: 62
// CHECK-NEXT: FileAttributes {
// CHECK-NEXT: Attribute {
// CHECK-NEXT: Tag: 67
// CHECK-NEXT: TagName: conformance
// CHECK-NEXT: Value: 2.09
// CHECK-NEXT: }
// CHECK-NEXT: Attribute {
// CHECK-NEXT: Tag: 5
// CHECK-NEXT: TagName: CPU_name
// CHECK-NEXT: Value: cortex-a8
// CHECK-NEXT: }
// CHECK-NEXT: Attribute {
// CHECK-NEXT: Tag: 6
// CHECK-NEXT: Value: 10
// CHECK-NEXT: TagName: CPU_arch
// CHECK-NEXT: Description: ARM v7
// CHECK-NEXT: }
// CHECK-NEXT: Attribute {
// CHECK-NEXT: Tag: 7
// CHECK-NEXT: Value: 65
// CHECK-NEXT: TagName: CPU_arch_profile
// CHECK-NEXT: Description: Application
// CHECK-NEXT: }
// CHECK-NEXT: Attribute {
// CHECK-NEXT: Tag: 8
// CHECK-NEXT: Value: 1
// CHECK-NEXT: TagName: ARM_ISA_use
// CHECK-NEXT: Description: Permitted
// CHECK-NEXT: }
// CHECK-NEXT: Attribute {
// CHECK-NEXT: Tag: 9
// CHECK-NEXT: Value: 2
// CHECK-NEXT: TagName: THUMB_ISA_use
// CHECK-NEXT: Description: Thumb-2
// CHECK-NEXT: }
// CHECK-NEXT: Attribute {
// CHECK-NEXT: Tag: 10
// CHECK-NEXT: Value: 3
// CHECK-NEXT: TagName: FP_arch
// CHECK-NEXT: Description: VFPv3
// CHECK-NEXT: }
// CHECK-NEXT: Attribute {
// CHECK-NEXT: Tag: 12
// CHECK-NEXT: Value: 1
// CHECK-NEXT: TagName: Advanced_SIMD_arch
// CHECK-NEXT: Description: NEONv1
// CHECK-NEXT: }
// CHECK-NEXT: Attribute {
// CHECK-NEXT: Tag: 14
// CHECK-NEXT: Value: 0
// CHECK-NEXT: TagName: ABI_PCS_R9_use
// CHECK-NEXT: Description: v6
// CHECK-NEXT: }
// CHECK-NEXT: Attribute {
// CHECK-NEXT: Tag: 15
// CHECK-NEXT: Value: 1
// CHECK-NEXT: TagName: ABI_PCS_RW_data
// CHECK-NEXT: Description: PC-relative
// CHECK-NEXT: }
// CHECK-NEXT: Attribute {
// CHECK-NEXT: Tag: 16
// CHECK-NEXT: Value: 1
// CHECK-NEXT: TagName: ABI_PCS_RO_data
// CHECK-NEXT: Description: PC-relative
// CHECK-NEXT: }
// CHECK-NEXT: Attribute {
// CHECK-NEXT: Tag: 17
// CHECK-NEXT: Value: 2
// CHECK-NEXT: TagName: ABI_PCS_GOT_use
// CHECK-NEXT: Description: GOT-Indirect
// CHECK-NEXT: }
// CHECK-NEXT: Attribute {
// CHECK-NEXT: Tag: 18
// CHECK-NEXT: Value: 4
// CHECK-NEXT: TagName: ABI_PCS_wchar_t
// CHECK-NEXT: Description: 4-byte
// CHECK-NEXT: }
// CHECK-NEXT: Attribute {
// CHECK-NEXT: Tag: 20
// CHECK-NEXT: Value: 1
// CHECK-NEXT: TagName: ABI_FP_denormal
// CHECK-NEXT: Description: IEEE-754
// CHECK-NEXT: }
// CHECK-NEXT: Attribute {
// CHECK-NEXT: Tag: 21
// CHECK-NEXT: Value: 1
// CHECK-NEXT: TagName: ABI_FP_exceptions
// CHECK-NEXT: Description: IEEE-754
// CHECK-NEXT: }
// CHECK-NEXT: Attribute {
// CHECK-NEXT: Tag: 23
// CHECK-NEXT: Value: 3
// CHECK-NEXT: TagName: ABI_FP_number_model
// CHECK-NEXT: Description: IEEE-754
// CHECK-NEXT: }
// CHECK-NEXT: Attribute {
// CHECK-NEXT: Tag: 24
// CHECK-NEXT: Value: 1
// CHECK-NEXT: TagName: ABI_align_needed
// CHECK-NEXT: Description: 8-byte alignment
// CHECK-NEXT: }
// CHECK-NEXT: Attribute {
// CHECK-NEXT: Tag: 25
// CHECK-NEXT: Value: 1
// CHECK-NEXT: TagName: ABI_align_preserved
// CHECK-NEXT: Description: 8-byte data alignment
// CHECK-NEXT: }
// CHECK-NEXT: Attribute {
// CHECK-NEXT: Tag: 26
// CHECK-NEXT: Value: 2
// CHECK-NEXT: TagName: ABI_enum_size
// CHECK-NEXT: Description: Int32
// CHECK-NEXT: }
// CHECK-NEXT: Attribute {
// CHECK-NEXT: Tag: 34
// CHECK-NEXT: Value: 1
// CHECK-NEXT: TagName: CPU_unaligned_access
// CHECK-NEXT: Description: v6-style
// CHECK-NEXT: }
// CHECK-NEXT: Attribute {
// CHECK-NEXT: Tag: 38
// CHECK-NEXT: Value: 1
// CHECK-NEXT: TagName: ABI_FP_16bit_format
// CHECK-NEXT: Description: IEEE-754
// CHECK-NEXT: }
// CHECK-NEXT: Attribute {
// CHECK-NEXT: Tag: 68
// CHECK-NEXT: Value: 1
// CHECK-NEXT: TagName: Virtualization_use
// CHECK-NEXT: Description: TrustZone
// CHECK-NEXT: }