File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -400,6 +400,15 @@ pub mod __rand {
400
400
pub use rand:: { thread_rng, ThreadRng , Rng } ;
401
401
}
402
402
403
+ // Rust runtime's startup objects depend on these symbols, so they must be public.
404
+ // Since sys_common isn't public, we have to re-export them here explicitly.
405
+ #[ doc( hidden) ]
406
+ #[ unstable( feature = "eh_frame_registry" , issue = "0" ) ]
407
+ #[ cfg( all( target_os="windows" , target_arch = "x86" , target_env="gnu" ) ) ]
408
+ pub mod __frame_registry {
409
+ pub use sys_common:: unwind:: imp:: eh_frame_registry:: * ;
410
+ }
411
+
403
412
// Include a number of private modules that exist solely to provide
404
413
// the rustdoc documentation for primitive types. Using `include!`
405
414
// because rustdoc only looks for these modules at the crate level.
Original file line number Diff line number Diff line change @@ -128,6 +128,10 @@ extern {}
128
128
#[ link( name = "c++abi" ) ]
129
129
extern { }
130
130
131
+ #[ cfg( all( target_os = "windows" , target_env="gnu" ) ) ]
132
+ #[ link( name = "gcc_eh" ) ]
133
+ extern { }
134
+
131
135
extern "C" {
132
136
// iOS on armv7 uses SjLj exceptions and requires to link
133
137
// against corresponding routine (..._SjLj_...)
Original file line number Diff line number Diff line change @@ -238,3 +238,24 @@ pub mod eabi {
238
238
unsafe extern fn rust_eh_unwind_resume ( panic_ctx : * mut u8 ) -> ! {
239
239
uw:: _Unwind_Resume ( panic_ctx as * mut uw:: _Unwind_Exception ) ;
240
240
}
241
+
242
+ #[ cfg( all( target_os="windows" , target_arch = "x86" , target_env="gnu" ) ) ]
243
+ pub mod eh_frame_registry {
244
+ #[ link( name = "gcc_eh" ) ]
245
+ extern {
246
+ fn __register_frame_info ( eh_frame_begin : * const u8 , object : * mut u8 ) ;
247
+ fn __deregister_frame_info ( eh_frame_begin : * const u8 , object : * mut u8 ) ;
248
+ }
249
+ #[ cfg( not( test) ) ]
250
+ #[ no_mangle]
251
+ pub unsafe extern fn rust_eh_register_frames ( eh_frame_begin : * const u8 ,
252
+ object : * mut u8 ) {
253
+ __register_frame_info ( eh_frame_begin, object) ;
254
+ }
255
+ #[ cfg( not( test) ) ]
256
+ #[ no_mangle]
257
+ pub unsafe extern fn rust_eh_unregister_frames ( eh_frame_begin : * const u8 ,
258
+ object : * mut u8 ) {
259
+ __deregister_frame_info ( eh_frame_begin, object) ;
260
+ }
261
+ }
You can’t perform that action at this time.
0 commit comments