blob: 74fd38eaf880f40abf6ca36dd90996cf5a6be3c8 [file] [log] [blame]
Rafael Espindola34e3d0c2010-09-16 17:05:55 +00001// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
2
3// Test that these names are accepted.
4
5.section .note.GNU-stack,"",@progbits
6.section .note.GNU-,"",@progbits
7.section -.note.GNU,"",@progbits
8
Jason W Kimf7d52782010-10-19 17:39:10 +00009// CHECK: ('sh_name', 0x00000012) # '.note.GNU-stack'
10// CHECK: ('sh_name', 0x00000022) # '.note.GNU-'
11// CHECK: ('sh_name', 0x0000002d) # '-.note.GNU'
Rafael Espindola4fa34782010-10-27 18:45:20 +000012
Rafael Espindola4faf7c72010-11-08 02:47:59 +000013// Test that the dafults are used
Rafael Espindola4fa34782010-10-27 18:45:20 +000014
15.section .init
16.section .fini
Rafael Espindola4faf7c72010-11-08 02:47:59 +000017.section .rodata
Rafael Espindola4fa34782010-10-27 18:45:20 +000018
19// CHECK: (('sh_name', 0x00000038) # '.init'
20// CHECK-NEXT: ('sh_type', 0x00000001)
21// CHECK-NEXT: ('sh_flags', 0x00000006)
22// CHECK-NEXT: ('sh_addr', 0x00000000)
23// CHECK-NEXT: ('sh_offset', 0x00000040)
24// CHECK-NEXT: ('sh_size', 0x00000000)
25// CHECK-NEXT: ('sh_link', 0x00000000)
26// CHECK-NEXT: ('sh_info', 0x00000000)
27// CHECK-NEXT: ('sh_addralign', 0x00000001)
28// CHECK-NEXT: ('sh_entsize', 0x00000000)
29// CHECK-NEXT: ),
30// CHECK-NEXT: # Section 0x00000008
31// CHECK-NEXT: (('sh_name', 0x0000003e) # '.fini'
32// CHECK-NEXT: ('sh_type', 0x00000001)
33// CHECK-NEXT: ('sh_flags', 0x00000006)
34// CHECK-NEXT: ('sh_addr', 0x00000000)
35// CHECK-NEXT: ('sh_offset', 0x00000040)
36// CHECK-NEXT: ('sh_size', 0x00000000)
37// CHECK-NEXT: ('sh_link', 0x00000000)
38// CHECK-NEXT: ('sh_info', 0x00000000)
39// CHECK-NEXT: ('sh_addralign', 0x00000001)
40// CHECK-NEXT: ('sh_entsize', 0x00000000)
Rafael Espindola4faf7c72010-11-08 02:47:59 +000041// CHECK-NEXT: ),
42// CHECK-NEXT: # Section 0x00000009
43// CHECK-NEXT: (('sh_name', 0x00000044) # '.rodata'
44// CHECK-NEXT: ('sh_type', 0x00000001)
45// CHECK-NEXT: ('sh_flags', 0x00000002)
46// CHECK-NEXT: ('sh_addr', 0x00000000)
47// CHECK-NEXT: ('sh_offset', 0x00000040)
48// CHECK-NEXT: ('sh_size', 0x00000000)
49// CHECK-NEXT: ('sh_link', 0x00000000)
50// CHECK-NEXT: ('sh_info', 0x00000000)
51// CHECK-NEXT: ('sh_addralign', 0x00000001)
52// CHECK-NEXT: ('sh_entsize', 0x00000000)
53// CHECK-NEXT: ),
Rafael Espindolaf4b0f3e2010-10-28 21:33:33 +000054
55// Test that we can parse these
56.section .text.foo,"axG",@progbits,foo,comdat
57.section .text.bar,"axMG",@progbits,42,bar,.gnu.linkonce