|
10 | 10 | # CHECK: GuardCFCheckFunction: 0x0
|
11 | 11 | # CHECK: GuardCFCheckDispatch: 0x0
|
12 | 12 | # CHECK: GuardCFFunctionTable: 0x14000{{.*}}
|
13 |
| -# CHECK: GuardCFFunctionCount: 4 |
| 13 | +# CHECK: GuardCFFunctionCount: 1 |
14 | 14 | # CHECK: GuardFlags [ (0x400500)
|
15 | 15 | # CHECK: CF_FUNCTION_TABLE_PRESENT (0x400)
|
16 | 16 | # CHECK: CF_INSTRUMENTED (0x100)
|
|
19 | 19 | # CHECK: GuardAddressTakenIatEntryTable: 0x0
|
20 | 20 | # CHECK: GuardAddressTakenIatEntryCount: 0
|
21 | 21 | # CHECK: GuardEHContinuationTable: 0x14000{{.*}}
|
22 |
| -# CHECK: GuardEHContinuationCount: 1 |
| 22 | +# CHECK: GuardEHContinuationCount: 2 |
23 | 23 | # CHECK: ]
|
24 | 24 | # CHECK: GuardEHContTable [
|
25 | 25 | # CHECK-NEXT: 0x14000{{.*}}
|
| 26 | +# CHECK-NEXT: 0x14000{{.*}} |
26 | 27 | # CHECK-NEXT: ]
|
27 | 28 |
|
28 |
| - |
29 |
| -# This assembly is reduced from C code like: |
30 |
| -# int main() |
31 |
| -# { |
32 |
| -# try { |
33 |
| -# throw 3; |
34 |
| -# } |
35 |
| -# catch (int e) { |
36 |
| -# return e != 3; |
37 |
| -# } |
38 |
| -# return 2; |
39 |
| -# } |
40 |
| - |
41 | 29 | # We need @feat.00 to have 0x4000 to indicate /guard:ehcont.
|
42 | 30 | .def @feat.00;
|
43 | 31 | .scl 3;
|
|
48 | 36 | .def main; .scl 2; .type 32; .endef
|
49 | 37 | .globl main # -- Begin function main
|
50 | 38 | .p2align 4, 0x90
|
51 |
| -main: # @main |
52 |
| -.Lfunc_begin0: |
| 39 | +main: |
53 | 40 | .seh_proc main
|
54 |
| -.intel_syntax |
55 |
| - .seh_handler __CxxFrameHandler3, @unwind, @except |
56 |
| -# %bb.0: # %entry |
57 |
| - push rbp |
58 |
| - .seh_pushreg rbp |
59 |
| - sub rsp, 64 |
60 |
| - .seh_stackalloc 64 |
61 |
| - lea rbp, [rsp + 64] |
62 |
| - .seh_setframe rbp, 64 |
63 |
| - .seh_endprologue |
64 |
| - mov qword ptr [rbp - 16], -2 |
65 |
| - mov dword ptr [rbp - 20], 0 |
66 |
| - mov dword ptr [rbp - 24], 3 |
67 |
| -.Ltmp0: |
68 |
| - lea rdx, [rip + _TI1H] |
69 |
| - lea rcx, [rbp - 24] |
70 |
| - call _CxxThrowException |
71 |
| -.Ltmp1: |
72 |
| - jmp .LBB0_3 |
73 |
| -.LBB0_2: # Block address taken |
74 |
| - # %catchret.dest |
75 |
| -$ehgcr_0_2: |
76 |
| - mov eax, dword ptr [rbp - 20] |
77 |
| - add rsp, 64 |
78 |
| - pop rbp |
79 |
| - ret |
80 |
| -.LBB0_3: # %unreachable |
81 |
| - int3 |
82 |
| - .seh_handlerdata |
83 |
| - .long ($cppxdata$main)@IMGREL |
84 |
| - .text |
85 |
| - .seh_endproc |
86 |
| - .def "?catch$1@?0?main@4HA"; |
87 |
| - .scl 3; |
88 |
| - .type 32; |
89 |
| - .endef |
90 |
| - .p2align 4, 0x90 |
91 |
| -"?catch$1@?0?main@4HA": |
92 |
| -.seh_proc "?catch$1@?0?main@4HA" |
93 |
| - .seh_handler __CxxFrameHandler3, @unwind, @except |
94 |
| -.LBB0_1: # %catch |
95 |
| - mov qword ptr [rsp + 16], rdx |
96 |
| - push rbp |
97 |
| - .seh_pushreg rbp |
98 |
| - sub rsp, 32 |
99 |
| - .seh_stackalloc 32 |
100 |
| - lea rbp, [rdx + 64] |
101 |
| - .seh_endprologue |
102 |
| - mov eax, dword ptr [rbp - 4] |
103 |
| - sub eax, 3 |
104 |
| - setne al |
105 |
| - movzx eax, al |
106 |
| - mov dword ptr [rbp - 20], eax |
107 |
| - lea rax, [rip + .LBB0_2] |
108 |
| - add rsp, 32 |
109 |
| - pop rbp |
110 |
| - ret # CATCHRET |
111 |
| - .def free; .scl 2; .type 32; .endef |
112 |
| - .globl free |
113 |
| -free: |
114 |
| - ret |
115 |
| - .def __CxxFrameHandler3; .scl 2; .type 32; .endef |
116 |
| - .globl __CxxFrameHandler3 |
117 |
| -__CxxFrameHandler3: |
118 |
| - ret |
119 |
| - .def _CxxThrowException; .scl 2; .type 32; .endef |
120 |
| - .globl _CxxThrowException |
121 |
| -_CxxThrowException: |
122 |
| - ret |
123 |
| -.Lfunc_end0: |
| 41 | + .seh_handler __C_specific_handler, @unwind, @except |
124 | 42 | .seh_handlerdata
|
125 |
| - .long ($cppxdata$main)@IMGREL |
| 43 | + .long 2 |
| 44 | + .long (seh_begin)@IMGREL |
| 45 | + .long (seh_end)@IMGREL |
| 46 | + .long 1 |
| 47 | + .long (seh_except)@IMGREL |
| 48 | + .long (seh2_begin)@IMGREL |
| 49 | + .long (seh2_end)@IMGREL |
| 50 | + .long 1 |
| 51 | + .long (seh2_except)@IMGREL |
126 | 52 | .text
|
127 |
| - .seh_endproc |
128 |
| - .section .xdata,"dr" |
129 |
| - .p2align 2 |
130 |
| -$cppxdata$main: |
131 |
| - .long 429065506 # MagicNumber |
132 |
| - .long 2 # MaxState |
133 |
| - .long ($stateUnwindMap$main)@IMGREL # UnwindMap |
134 |
| - .long 1 # NumTryBlocks |
135 |
| - .long ($tryMap$main)@IMGREL # TryBlockMap |
136 |
| - .long 4 # IPMapEntries |
137 |
| - .long ($ip2state$main)@IMGREL # IPToStateXData |
138 |
| - .long 48 # UnwindHelp |
139 |
| - .long 0 # ESTypeList |
140 |
| - .long 1 # EHFlags |
141 |
| -$stateUnwindMap$main: |
142 |
| - .long -1 # ToState |
143 |
| - .long 0 # Action |
144 |
| - .long -1 # ToState |
145 |
| - .long 0 # Action |
146 |
| -$tryMap$main: |
147 |
| - .long 0 # TryLow |
148 |
| - .long 0 # TryHigh |
149 |
| - .long 1 # CatchHigh |
150 |
| - .long 1 # NumCatches |
151 |
| - .long ($handlerMap$0$main)@IMGREL # HandlerArray |
152 |
| -$handlerMap$0$main: |
153 |
| - .long 0 # Adjectives |
154 |
| - .long "??_R0H@8"@IMGREL # Type |
155 |
| - .long 60 # CatchObjOffset |
156 |
| - .long "?catch$1@?0?main@4HA"@IMGREL # Handler |
157 |
| - .long 56 # ParentFrameOffset |
158 |
| -$ip2state$main: |
159 |
| - .long .Lfunc_begin0@IMGREL # IP |
160 |
| - .long -1 # ToState |
161 |
| - .long .Ltmp0@IMGREL+1 # IP |
162 |
| - .long 0 # ToState |
163 |
| - .long .Ltmp1@IMGREL+1 # IP |
164 |
| - .long -1 # ToState |
165 |
| - .long "?catch$1@?0?main@4HA"@IMGREL # IP |
166 |
| - .long 1 # ToState |
167 |
| - .text |
168 |
| - # -- End function |
169 |
| - .section .data,"dw",discard,"??_R0H@8" |
170 |
| - .globl "??_R0H@8" # @"??_R0H@8" |
171 |
| - .p2align 4 |
172 |
| -"??_R0H@8": |
173 |
| - .quad 0 |
174 |
| - .quad 0 |
175 |
| - .asciz ".H" |
176 |
| - .zero 5 |
| 53 | + seh_begin: |
| 54 | + nop |
| 55 | + int3 |
| 56 | + nop |
| 57 | + seh_end: |
| 58 | + nop |
| 59 | + seh_except: |
| 60 | + nop |
177 | 61 |
|
178 |
| - .section .xdata,"dr",discard,"_CT??_R0H@84" |
179 |
| - .globl "_CT??_R0H@84" # @"_CT??_R0H@84" |
180 |
| - .p2align 4 |
181 |
| -"_CT??_R0H@84": |
182 |
| - .long 1 # 0x1 |
183 |
| - .long "??_R0H@8"@IMGREL |
184 |
| - .long 0 # 0x0 |
185 |
| - .long 4294967295 # 0xffffffff |
186 |
| - .long 0 # 0x0 |
187 |
| - .long 4 # 0x4 |
188 |
| - .long 0 # 0x0 |
| 62 | + seh2_begin: |
| 63 | + nop |
| 64 | + int3 |
| 65 | + nop |
| 66 | + seh2_end: |
| 67 | + nop |
| 68 | + seh2_except: |
| 69 | + nop |
| 70 | + |
| 71 | + xor %eax, %eax |
| 72 | + ret |
| 73 | +.seh_endproc |
189 | 74 |
|
190 |
| - .section .xdata,"dr",discard,_CTA1H |
191 |
| - .globl _CTA1H # @_CTA1H |
192 |
| - .p2align 3 |
193 |
| -_CTA1H: |
194 |
| - .long 1 # 0x1 |
195 |
| - .long "_CT??_R0H@84"@IMGREL |
| 75 | +__C_specific_handler: |
| 76 | + ret |
196 | 77 |
|
197 |
| - .section .xdata,"dr",discard,_TI1H |
198 |
| - .globl _TI1H # @_TI1H |
199 |
| - .p2align 3 |
200 |
| -_TI1H: |
201 |
| - .long 0 # 0x0 |
202 |
| - .long 0 # 0x0 |
203 |
| - .long 0 # 0x0 |
204 |
| - .long _CTA1H@IMGREL |
| 78 | +.section .gehcont$y,"dr" |
| 79 | +.symidx seh_except |
| 80 | +.symidx seh2_except |
205 | 81 |
|
206 |
| - .section .gehcont$y,"dr" |
207 |
| - .symidx $ehgcr_0_2 |
208 |
| - .addrsig_sym _CxxThrowException |
209 |
| - .addrsig_sym __CxxFrameHandler3 |
210 |
| - .addrsig_sym "??_R0H@8" |
211 |
| - .addrsig_sym __ImageBase |
212 |
| - .section .rdata,"dr" |
| 82 | +.section .rdata,"dr" |
213 | 83 | .globl _load_config_used
|
214 | 84 | _load_config_used:
|
215 | 85 | .long 312
|
|
0 commit comments