issue = "0")]
#![doc(hidden)]
-use borrow::ToOwned;
-use mem;
-use sys;
-use sys_common::thread_info::{self, NewThread};
-use sys_common;
-use thread::{self, Thread};
+
// Reexport some of our utilities which are expected by other crates.
pub use sys_common::unwind::{begin_unwind, begin_unwind_fmt};
+// Rust runtime's startup objects depend on these symbols, so they must be public.
+// Since sys_common isn't public, we have to re-export them here.
+#[cfg(all(target_os="windows", target_arch = "x86", target_env="gnu"))]
+pub use sys_common::unwind::imp::eh_frame_registry::*;
+
#[cfg(not(test))]
#[lang = "start"]
fn lang_start(main: *const u8, argc: isize, argv: *const *const u8) -> isize {
+ use borrow::ToOwned;
+ use mem;
+ use panic;
+ use sys;
+ use sys_common;
+ use sys_common::thread_info::{self, NewThread};
+ use thread::Thread;
+
sys::init();
let failed = unsafe {
sys_common::args::init(argc, argv);
// Let's run some code!
- let res = thread::catch_panic(mem::transmute::<_, fn()>(main));
+ let res = panic::recover(mem::transmute::<_, fn()>(main));
sys_common::cleanup();
res.is_err()
};