Fixed some bugs.
[llvm/zpu.git] / test / MC / ELF / section.s
blob9c7288036dfaf6c97cd97c290843ab408329ff6e
1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
3 // Test that these names are accepted.
5 .section .note.GNU-stack,"",@progbits
6 .section .note.GNU-,"",@progbits
7 .section -.note.GNU,"",@progbits
9 // CHECK: ('sh_name', 0x00000012) # '.note.GNU-stack'
10 // CHECK: ('sh_name', 0x00000022) # '.note.GNU-'
11 // CHECK: ('sh_name', 0x0000002d) # '-.note.GNU'
13 // Test that the dafults for init and fini are used
15 .section .init
16 .section .fini
18 // CHECK: (('sh_name', 0x00000038) # '.init'
19 // CHECK-NEXT: ('sh_type', 0x00000001)
20 // CHECK-NEXT: ('sh_flags', 0x00000006)
21 // CHECK-NEXT: ('sh_addr', 0x00000000)
22 // CHECK-NEXT: ('sh_offset', 0x00000040)
23 // CHECK-NEXT: ('sh_size', 0x00000000)
24 // CHECK-NEXT: ('sh_link', 0x00000000)
25 // CHECK-NEXT: ('sh_info', 0x00000000)
26 // CHECK-NEXT: ('sh_addralign', 0x00000001)
27 // CHECK-NEXT: ('sh_entsize', 0x00000000)
28 // CHECK-NEXT: ),
29 // CHECK-NEXT: # Section 0x00000008
30 // CHECK-NEXT: (('sh_name', 0x0000003e) # '.fini'
31 // CHECK-NEXT: ('sh_type', 0x00000001)
32 // CHECK-NEXT: ('sh_flags', 0x00000006)
33 // CHECK-NEXT: ('sh_addr', 0x00000000)
34 // CHECK-NEXT: ('sh_offset', 0x00000040)
35 // CHECK-NEXT: ('sh_size', 0x00000000)
36 // CHECK-NEXT: ('sh_link', 0x00000000)
37 // CHECK-NEXT: ('sh_info', 0x00000000)
38 // CHECK-NEXT: ('sh_addralign', 0x00000001)
39 // CHECK-NEXT: ('sh_entsize', 0x00000000)
42 // Test that we can parse these
43 .section .text.foo,"axG",@progbits,foo,comdat
44 .section .text.bar,"axMG",@progbits,42,bar,.gnu.linkonce