1 // RUN
: llvm-mc
-filetype
=obj
-triple arm-eabi
%s
-o
- | llvm-readobj
-S
--symbols | FileCheck
%s
2 // Test that global variables
and functions are assigned correct section.
5 .eabi_attribute 67, "2.09" @ Tag_conformance
6 .eabi_attribute 6, 1 @ Tag_CPU_arch
7 .eabi_attribute 8, 1 @ Tag_ARM_ISA_use
8 .eabi_attribute 17, 1 @ Tag_ABI_PCS_GOT_use
9 .eabi_attribute 20, 1 @ Tag_ABI_FP_denormal
10 .eabi_attribute 21, 1 @ Tag_ABI_FP_exceptions
11 .eabi_attribute 23, 3 @ Tag_ABI_FP_number_model
12 .eabi_attribute 34, 1 @ Tag_CPU_unaligned_access
13 .eabi_attribute 24, 1 @ Tag_ABI_align_needed
14 .eabi_attribute 25, 1 @ Tag_ABI_align_preserved
15 .eabi_attribute 38, 1 @ Tag_ABI_FP_16bit_format
16 .eabi_attribute 18, 4 @ Tag_ABI_PCS_wchar_t
17 .eabi_attribute 26, 2 @ Tag_ABI_enum_size
18 .eabi_attribute 14, 0 @ Tag_ABI_PCS_R9_use
19 .section my_text.1,"ax",%progbits
35 .size foo, .Lfunc_end0-foo
39 .section my_text.2,"ax",%progbits
59 .long _ZZ3gooE7lstat_h
61 .size goo, .Lfunc_end1-goo
81 .size hoo, .Lfunc_end2-hoo
86 .section my_bss.1,"aw",%nobits
94 .section my_data.1,"aw",%progbits
102 .section my_bss.1,"aw",%nobits
117 .section my_data.1,"aw",%progbits
130 .section my_rodata.1,"a",%progbits
146 .section my_bss.2,"aw",%nobits
154 .section my_rodata.1,"a",%progbits
162 .section my_bss.2,"aw",%nobits
169 .type _ZZ3gooE7lstat_h,%object @ @_ZZ3gooE7lstat_h
173 .size _ZZ3gooE7lstat_h, 4
175 .type _ZL1g,%object @ @_ZL1g
176 .section my_bss.1,"aw",%nobits
183 .section my_data.2,"aw",%progbits
191 .section my_rodata.2,"a",%progbits
215 .section .rodata,"a",%progbits
223 .ident "clang version 5.0.0"
224 .section ".note.GNU-stack","",%progbits
225 .eabi_attribute 30, 1 @ Tag_ABI_optimization_goals
229 //CHECK
: Type
: SHT_PROGBITS
(0x1)
230 //CHECK
: Flags
[ (0x6)
231 //CHECK
: SHF_ALLOC
(0x2)
232 //CHECK
: SHF_EXECINSTR
(0x4)
236 //CHECK
: Name
: my_text.1
237 //CHECK
: Type
: SHT_PROGBITS
(0x1)
238 //CHECK
: Flags
[ (0x6)
239 //CHECK
: SHF_ALLOC
(0x2)
240 //CHECK
: SHF_EXECINSTR
(0x4)
244 //CHECK
: Name
: my_text.2
245 //CHECK
: Type
: SHT_PROGBITS
(0x1)
246 //CHECK
: Flags
[ (0x6)
247 //CHECK
: SHF_ALLOC
(0x2)
248 //CHECK
: SHF_EXECINSTR
(0x4)
252 //CHECK
: Name
: my_bss.1
253 //CHECK
: Type
: SHT_NOBITS
(0x8)
254 //CHECK
: Flags
[ (0x3)
255 //CHECK
: SHF_ALLOC
(0x2)
256 //CHECK
: SHF_WRITE
(0x1)
260 //CHECK
: Name
: my_data.1
261 //CHECK
: Type
: SHT_PROGBITS
(0x1)
262 //CHECK
: Flags
[ (0x3)
263 //CHECK
: SHF_ALLOC
(0x2)
264 //CHECK
: SHF_WRITE
(0x1)
268 //CHECK
: Name
: my_rodata.1
269 //CHECK
: Type
: SHT_PROGBITS
(0x1)
270 //CHECK
: Flags
[ (0x2)
271 //CHECK
: SHF_ALLOC
(0x2)
276 //CHECK
: Type
: SHT_NOBITS
(0x8)
277 //CHECK
: Flags
[ (0x3)
278 //CHECK
: SHF_ALLOC
(0x2)
279 //CHECK
: SHF_WRITE
(0x1)
283 //CHECK
: Name
: my_bss.2
284 //CHECK
: Type
: SHT_NOBITS
(0x8)
285 //CHECK
: Flags
[ (0x3)
286 //CHECK
: SHF_ALLOC
(0x2)
287 //CHECK
: SHF_WRITE
(0x1)
291 //CHECK
: Name
: my_data.2
292 //CHECK
: Type
: SHT_PROGBITS
(0x1)
293 //CHECK
: Flags
[ (0x3)
294 //CHECK
: SHF_ALLOC
(0x2)
295 //CHECK
: SHF_WRITE
(0x1)
299 //CHECK
: Name
: my_rodata.2
300 //CHECK
: Type
: SHT_PROGBITS
(0x1)
301 //CHECK
: Flags
[ (0x2)
302 //CHECK
: SHF_ALLOC
(0x2)
307 //CHECK
: Type
: SHT_PROGBITS
(0x1)
308 //CHECK
: Flags
[ (0x3)
309 //CHECK
: SHF_ALLOC
(0x2)
310 //CHECK
: SHF_WRITE
(0x1)
314 //CHECK
: Name
: .rodata
315 //CHECK
: Type
: SHT_PROGBITS
(0x1)
316 //CHECK
: Flags
[ (0x2)
317 //CHECK
: SHF_ALLOC
(0x2)
322 //CHECK
: Section
: my_bss.1
(0xE)
325 //CHECK
: Name
: _ZZ3gooE7lstat_h
326 //CHECK
: Section
: my_bss.2
(0x12)
330 //CHECK
: Section
: my_bss.1
(0xE)
334 //CHECK
: Section
: my_data.1
(0xF)
338 //CHECK
: Section
: my_bss.1
(0xE)
342 //CHECK
: Section
: my_bss.1
(0xE)
346 //CHECK
: Section
: my_data.1
(0xF)
350 //CHECK
: Section
: my_rodata.1
(0x10)
354 //CHECK
: Section
: my_text.1
(0x4)
358 //CHECK
: Section
: my_text.2
(0x8)
362 //CHECK
: Section
: .bss (0x11)
366 //CHECK
: Section
: .text (0x2)
370 //CHECK
: Section
: my_bss.2
(0x12)
374 //CHECK
: Section
: my_rodata.1
(0x10)
378 //CHECK
: Section
: my_bss.2
(0x12)
382 //CHECK
: Section
: my_data.2
(0x13)
386 //CHECK
: Section
: my_rodata.2
(0x14)
390 //CHECK
: Section
: .bss (0x11)
394 //CHECK
: Section
: .data (0x15)
398 //CHECK
: Section
: .rodata (0x16)