1 // RUN
: llvm-mc
-triple i386-pc-win32
-filetype
=obj
%s | llvm-readobj
-S | FileCheck
%s
2 // RUN
: llvm-mc
-triple x86_64-pc-win32
-filetype
=obj
%s | llvm-readobj
-S | FileCheck
%s
4 .section .foo$bar; .long 1
5 .section .foo@bar; .long 1
6 .section ABCDEFGHIJKLMNOPQRSTUVWXYZ; .long 1
7 .section abcdefghijklmnopqrstuvwxyz; .long 1
8 .section _0123456789; .long 1
12 // CHECK
: Name
: .foo$bar
15 // CHECK
: Name
: .foo@bar
18 // CHECK
: Name
: ABCDEFGHIJKLMNOPQRSTUVWXYZ
21 // CHECK
: Name
: abcdefghijklmnopqrstuvwxyz
24 // CHECK
: Name
: _0123456789
27 // Test that the defaults are used
29 .section s_, "" ; .long 1
30 .section s_a,"a"; .long 1
31 .section s_b,"b"; .long 1
32 .section s_d,"d"; .long 1
33 .section s_D,"D"; .long 1
34 .section s_n,"n"; .long 1
35 .section s_r,"r"; .long 1
36 .section s_s,"s"; .long 1
37 .section s_w,"w"; .long 1
38 .section s_x,"x"; .long 1
39 .section s_y,"y"; .long 1
43 // CHECK
: Characteristics
[
44 // CHECK-NEXT
: IMAGE_SCN_ALIGN_1BYTES
45 // CHECK-NEXT
: IMAGE_SCN_CNT_INITIALIZED_DATA
46 // CHECK-NEXT
: IMAGE_SCN_MEM_READ
47 // CHECK-NEXT
: IMAGE_SCN_MEM_WRITE
52 // CHECK
: Characteristics
[
53 // CHECK-NEXT
: IMAGE_SCN_ALIGN_1BYTES
54 // CHECK-NEXT
: IMAGE_SCN_CNT_INITIALIZED_DATA
55 // CHECK-NEXT
: IMAGE_SCN_MEM_READ
56 // CHECK-NEXT
: IMAGE_SCN_MEM_WRITE
61 // CHECK
: Characteristics
[
62 // CHECK-NEXT
: IMAGE_SCN_ALIGN_1BYTES
63 // CHECK-NEXT
: IMAGE_SCN_CNT_INITIALIZED_DATA
64 // CHECK-NEXT
: IMAGE_SCN_MEM_READ
65 // CHECK-NEXT
: IMAGE_SCN_MEM_WRITE
70 // CHECK
: Characteristics
[
71 // CHECK-NEXT
: IMAGE_SCN_ALIGN_1BYTES
72 // CHECK-NEXT
: IMAGE_SCN_CNT_UNINITIALIZED_DATA
73 // CHECK-NEXT
: IMAGE_SCN_MEM_READ
74 // CHECK-NEXT
: IMAGE_SCN_MEM_WRITE
79 // CHECK
: Characteristics
[
80 // CHECK-NEXT
: IMAGE_SCN_ALIGN_1BYTES
81 // CHECK-NEXT
: IMAGE_SCN_CNT_INITIALIZED_DATA
82 // CHECK-NEXT
: IMAGE_SCN_MEM_READ
83 // CHECK-NEXT
: IMAGE_SCN_MEM_WRITE
88 // CHECK
: Characteristics
[
89 // CHECK-NEXT
: IMAGE_SCN_ALIGN_1BYTES
90 // CHECK-NEXT
: IMAGE_SCN_MEM_DISCARDABLE
91 // CHECK-NEXT
: IMAGE_SCN_MEM_READ
92 // CHECK-NEXT
: IMAGE_SCN_MEM_WRITE
97 // CHECK
: Characteristics
[
98 // CHECK-NEXT
: IMAGE_SCN_ALIGN_1BYTES
99 // CHECK-NEXT
: IMAGE_SCN_LNK_REMOVE
100 // CHECK-NEXT
: IMAGE_SCN_MEM_READ
101 // CHECK-NEXT
: IMAGE_SCN_MEM_WRITE
106 // CHECK
: Characteristics
[
107 // CHECK-NEXT
: IMAGE_SCN_ALIGN_1BYTES
108 // CHECK-NEXT
: IMAGE_SCN_CNT_INITIALIZED_DATA
109 // CHECK-NEXT
: IMAGE_SCN_MEM_READ
114 // CHECK
: Characteristics
[
115 // CHECK-NEXT
: IMAGE_SCN_ALIGN_1BYTES
116 // CHECK-NEXT
: IMAGE_SCN_CNT_INITIALIZED_DATA
117 // CHECK-NEXT
: IMAGE_SCN_MEM_READ
118 // CHECK-NEXT
: IMAGE_SCN_MEM_SHARED
119 // CHECK-NEXT
: IMAGE_SCN_MEM_WRITE
124 // CHECK
: Characteristics
[
125 // CHECK-NEXT
: IMAGE_SCN_ALIGN_1BYTES
126 // CHECK-NEXT
: IMAGE_SCN_CNT_INITIALIZED_DATA
127 // CHECK-NEXT
: IMAGE_SCN_MEM_READ
128 // CHECK-NEXT
: IMAGE_SCN_MEM_WRITE
133 // CHECK
: Characteristics
[
134 // CHECK-NEXT
: IMAGE_SCN_ALIGN_1BYTES
135 // CHECK-NEXT
: IMAGE_SCN_CNT_CODE
136 // CHECK-NEXT
: IMAGE_SCN_MEM_EXECUTE
137 // CHECK-NEXT
: IMAGE_SCN_MEM_READ
142 // CHECK
: Characteristics
[
143 // CHECK-NEXT
: IMAGE_SCN_ALIGN_1BYTES
147 // w makes read-only to readable
148 .section s_rw,"rw"; .long 1
151 // CHECK
: Characteristics
[
152 // CHECK-NEXT
: IMAGE_SCN_ALIGN_1BYTES
153 // CHECK-NEXT
: IMAGE_SCN_CNT_INITIALIZED_DATA
154 // CHECK-NEXT
: IMAGE_SCN_MEM_READ
155 // CHECK-NEXT
: IMAGE_SCN_MEM_WRITE
160 .section s_wr,"wr"; .long 1
163 // CHECK
: Characteristics
[
164 // CHECK-NEXT
: IMAGE_SCN_ALIGN_1BYTES
165 // CHECK-NEXT
: IMAGE_SCN_CNT_INITIALIZED_DATA
166 // CHECK-NEXT
: IMAGE_SCN_MEM_READ
171 .section s_rwy,"rwy"; .long 1
173 // CHECK
: Name
: s_rwy
174 // CHECK
: Characteristics
[
175 // CHECK-NEXT
: IMAGE_SCN_ALIGN_1BYTES
176 // CHECK-NEXT
: IMAGE_SCN_CNT_INITIALIZED_DATA
180 // Sections starting with
".debug" are implicitly discardable. This is
181 // compatible with gas.
182 .section .debug_asdf,"dr"; .long 1
184 // CHECK
: Name
: .debug_asdf
185 // CHECK
: Characteristics
[
186 // CHECK-NEXT
: IMAGE_SCN_ALIGN_1BYTES
187 // CHECK-NEXT
: IMAGE_SCN_CNT_INITIALIZED_DATA
188 // CHECK-NEXT
: IMAGE_SCN_MEM_DISCARDABLE
189 // CHECK-NEXT
: IMAGE_SCN_MEM_READ