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 3 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 9 10 // CHECK: Sections [ 11 // CHECK: Section { 12 // CHECK: Name: .foo$bar 13 // CHECK: } 14 // CHECK: Section { 15 // CHECK: Name: .foo@bar 16 // CHECK: } 17 // CHECK: Section { 18 // CHECK: Name: ABCDEFGHIJKLMNOPQRSTUVWXYZ 19 // CHECK: } 20 // CHECK: Section { 21 // CHECK: Name: abcdefghijklmnopqrstuvwxyz 22 // CHECK: } 23 // CHECK: Section { 24 // CHECK: Name: _0123456789 25 // CHECK: } 26 27 // Test that the defaults are used 28 .section s ; .long 1 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_n,"n"; .long 1 34 .section s_r,"r"; .long 1 35 .section s_s,"s"; .long 1 36 .section s_w,"w"; .long 1 37 .section s_x,"x"; .long 1 38 .section s_y,"y"; .long 1 39 40 // CHECK: Section { 41 // CHECK: Name: s 42 // CHECK: Characteristics [ 43 // CHECK-NEXT: IMAGE_SCN_ALIGN_1BYTES 44 // CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA 45 // CHECK-NEXT: IMAGE_SCN_MEM_READ 46 // CHECK-NEXT: IMAGE_SCN_MEM_WRITE 47 // CHECK-NEXT: ] 48 // CHECK: } 49 // CHECK: Section { 50 // CHECK: Name: s_ 51 // CHECK: Characteristics [ 52 // CHECK-NEXT: IMAGE_SCN_ALIGN_1BYTES 53 // CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA 54 // CHECK-NEXT: IMAGE_SCN_MEM_READ 55 // CHECK-NEXT: IMAGE_SCN_MEM_WRITE 56 // CHECK-NEXT: ] 57 // CHECK: } 58 // CHECK: Section { 59 // CHECK: Name: s_a 60 // CHECK: Characteristics [ 61 // CHECK-NEXT: IMAGE_SCN_ALIGN_1BYTES 62 // CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA 63 // CHECK-NEXT: IMAGE_SCN_MEM_READ 64 // CHECK-NEXT: IMAGE_SCN_MEM_WRITE 65 // CHECK-NEXT: ] 66 // CHECK: } 67 // CHECK: Section { 68 // CHECK: Name: s_b 69 // CHECK: Characteristics [ 70 // CHECK-NEXT: IMAGE_SCN_ALIGN_1BYTES 71 // CHECK-NEXT: IMAGE_SCN_CNT_UNINITIALIZED_DATA 72 // CHECK-NEXT: IMAGE_SCN_MEM_READ 73 // CHECK-NEXT: IMAGE_SCN_MEM_WRITE 74 // CHECK-NEXT: ] 75 // CHECK: } 76 // CHECK: Section { 77 // CHECK: Name: s_d 78 // CHECK: Characteristics [ 79 // CHECK-NEXT: IMAGE_SCN_ALIGN_1BYTES 80 // CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA 81 // CHECK-NEXT: IMAGE_SCN_MEM_READ 82 // CHECK-NEXT: IMAGE_SCN_MEM_WRITE 83 // CHECK-NEXT: ] 84 // CHECK: } 85 // CHECK: Section { 86 // CHECK: Name: s_n 87 // CHECK: Characteristics [ 88 // CHECK-NEXT: IMAGE_SCN_ALIGN_1BYTES 89 // CHECK-NEXT: IMAGE_SCN_LNK_REMOVE 90 // CHECK-NEXT: IMAGE_SCN_MEM_READ 91 // CHECK-NEXT: IMAGE_SCN_MEM_WRITE 92 // CHECK-NEXT: ] 93 // CHECK: } 94 // CHECK: Section { 95 // CHECK: Name: s_r 96 // CHECK: Characteristics [ 97 // CHECK-NEXT: IMAGE_SCN_ALIGN_1BYTES 98 // CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA 99 // CHECK-NEXT: IMAGE_SCN_MEM_READ 100 // CHECK-NEXT: ] 101 // CHECK: } 102 // CHECK: Section { 103 // CHECK: Name: s_s 104 // CHECK: Characteristics [ 105 // CHECK-NEXT: IMAGE_SCN_ALIGN_1BYTES 106 // CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA 107 // CHECK-NEXT: IMAGE_SCN_MEM_READ 108 // CHECK-NEXT: IMAGE_SCN_MEM_SHARED 109 // CHECK-NEXT: IMAGE_SCN_MEM_WRITE 110 // CHECK-NEXT: ] 111 // CHECK: } 112 // CHECK: Section { 113 // CHECK: Name: s_w 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_WRITE 119 // CHECK-NEXT: ] 120 // CHECK: } 121 // CHECK: Section { 122 // CHECK: Name: s_x 123 // CHECK: Characteristics [ 124 // CHECK-NEXT: IMAGE_SCN_ALIGN_1BYTES 125 // CHECK-NEXT: IMAGE_SCN_CNT_CODE 126 // CHECK-NEXT: IMAGE_SCN_MEM_EXECUTE 127 // CHECK-NEXT: IMAGE_SCN_MEM_READ 128 // CHECK-NEXT: ] 129 // CHECK: } 130 // CHECK: Section { 131 // CHECK: Name: s_y 132 // CHECK: Characteristics [ 133 // CHECK-NEXT: IMAGE_SCN_ALIGN_1BYTES 134 // CHECK-NEXT: ] 135 // CHECK: } 136 137 // w makes read-only to readable 138 .section s_rw,"rw"; .long 1 139 // CHECK: Section { 140 // CHECK: Name: s_rw 141 // CHECK: Characteristics [ 142 // CHECK-NEXT: IMAGE_SCN_ALIGN_1BYTES 143 // CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA 144 // CHECK-NEXT: IMAGE_SCN_MEM_READ 145 // CHECK-NEXT: IMAGE_SCN_MEM_WRITE 146 // CHECK-NEXT: ] 147 // CHECK: } 148 149 // r cancels w 150 .section s_wr,"wr"; .long 1 151 // CHECK: Section { 152 // CHECK: Name: s_wr 153 // CHECK: Characteristics [ 154 // CHECK-NEXT: IMAGE_SCN_ALIGN_1BYTES 155 // CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA 156 // CHECK-NEXT: IMAGE_SCN_MEM_READ 157 // CHECK-NEXT: ] 158 // CHECK: } 159 160 // y cancels both 161 .section s_rwy,"rwy"; .long 1 162 // CHECK: Section { 163 // CHECK: Name: s_rwy 164 // CHECK: Characteristics [ 165 // CHECK-NEXT: IMAGE_SCN_ALIGN_1BYTES 166 // CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA 167 // CHECK-NEXT: ] 168 // CHECK: } 169 170 // CHECK: ] 171