diff options
| author | Amanieu d'Antras <amanieu@gmail.com> | 2020-03-02 11:57:30 +0000 |
|---|---|---|
| committer | Amanieu d'Antras <amanieu@gmail.com> | 2020-03-05 17:36:50 +0000 |
| commit | 5953c100d1e9eea5ca70f185e905ea0773a34eb5 (patch) | |
| tree | 2c9b8874d42a001b879b878ac514c827422cf1da | |
| parent | f4f91f0b2f98ddf9ea36c4bc200ebda2cd898230 (diff) | |
| download | rust-5953c100d1e9eea5ca70f185e905ea0773a34eb5.tar.gz rust-5953c100d1e9eea5ca70f185e905ea0773a34eb5.zip | |
Use #[rustc_std_internal_symbol] instead of #[no_mangle]
| -rw-r--r-- | src/libpanic_abort/lib.rs | 10 | ||||
| -rw-r--r-- | src/libpanic_unwind/emcc.rs | 1 | ||||
| -rw-r--r-- | src/libpanic_unwind/gcc.rs | 7 | ||||
| -rw-r--r-- | src/libpanic_unwind/lib.rs | 4 |
4 files changed, 9 insertions, 13 deletions
diff --git a/src/libpanic_abort/lib.rs b/src/libpanic_abort/lib.rs index d894b50e077..1af93ff4ada 100644 --- a/src/libpanic_abort/lib.rs +++ b/src/libpanic_abort/lib.rs @@ -89,7 +89,7 @@ pub unsafe extern "C" fn __rust_start_panic(_payload: usize) -> u32 { // binaries, but it should never be called as we don't link in an unwinding // runtime at all. pub mod personalities { - #[no_mangle] + #[rustc_std_internal_symbol] #[cfg(not(any( all(target_arch = "wasm32", not(target_os = "emscripten"),), all(target_os = "windows", target_env = "gnu", target_arch = "x86_64",), @@ -98,7 +98,7 @@ pub mod personalities { // On x86_64-pc-windows-gnu we use our own personality function that needs // to return `ExceptionContinueSearch` as we're passing on all our frames. - #[no_mangle] + #[rustc_std_internal_symbol] #[cfg(all(target_os = "windows", target_env = "gnu", target_arch = "x86_64"))] pub extern "C" fn rust_eh_personality( _record: usize, @@ -114,16 +114,16 @@ pub mod personalities { // // Note that we don't execute landing pads, so this is never called, so it's // body is empty. - #[no_mangle] + #[rustc_std_internal_symbol] #[cfg(all(bootstrap, target_os = "windows", target_env = "gnu"))] pub extern "C" fn rust_eh_unwind_resume() {} // These two are called by our startup objects on i686-pc-windows-gnu, but // they don't need to do anything so the bodies are nops. - #[no_mangle] + #[rustc_std_internal_symbol] #[cfg(all(target_os = "windows", target_env = "gnu", target_arch = "x86"))] pub extern "C" fn rust_eh_register_frames() {} - #[no_mangle] + #[rustc_std_internal_symbol] #[cfg(all(target_os = "windows", target_env = "gnu", target_arch = "x86"))] pub extern "C" fn rust_eh_unregister_frames() {} } diff --git a/src/libpanic_unwind/emcc.rs b/src/libpanic_unwind/emcc.rs index e541ec30025..117246aa6c9 100644 --- a/src/libpanic_unwind/emcc.rs +++ b/src/libpanic_unwind/emcc.rs @@ -94,7 +94,6 @@ extern "C" fn exception_cleanup(ptr: *mut libc::c_void) -> DestructorRet { } #[lang = "eh_personality"] -#[no_mangle] unsafe extern "C" fn rust_eh_personality( version: c_int, actions: uw::_Unwind_Action, diff --git a/src/libpanic_unwind/gcc.rs b/src/libpanic_unwind/gcc.rs index 4fcf048a2cd..9c032b30341 100644 --- a/src/libpanic_unwind/gcc.rs +++ b/src/libpanic_unwind/gcc.rs @@ -130,7 +130,6 @@ cfg_if::cfg_if! { // // iOS uses the default routine instead since it uses SjLj unwinding. #[lang = "eh_personality"] - #[no_mangle] unsafe extern "C" fn rust_eh_personality(state: uw::_Unwind_State, exception_object: *mut uw::_Unwind_Exception, context: *mut uw::_Unwind_Context) @@ -264,7 +263,6 @@ cfg_if::cfg_if! { // On x86_64 MinGW targets, the unwinding mechanism is SEH however the unwind // handler data (aka LSDA) uses GCC-compatible encoding. #[lang = "eh_personality"] - #[no_mangle] #[allow(nonstandard_style)] unsafe extern "C" fn rust_eh_personality(exceptionRecord: *mut uw::EXCEPTION_RECORD, establisherFrame: uw::LPVOID, @@ -280,7 +278,6 @@ cfg_if::cfg_if! { } else { // The personality routine for most of our targets. #[lang = "eh_personality"] - #[no_mangle] unsafe extern "C" fn rust_eh_personality(version: c_int, actions: uw::_Unwind_Action, exception_class: uw::_Unwind_Exception_Class, @@ -351,12 +348,12 @@ pub mod eh_frame_registry { fn __deregister_frame_info(eh_frame_begin: *const u8, object: *mut u8); } - #[no_mangle] + #[rustc_std_internal_symbol] pub unsafe extern "C" fn rust_eh_register_frames(eh_frame_begin: *const u8, object: *mut u8) { __register_frame_info(eh_frame_begin, object); } - #[no_mangle] + #[rustc_std_internal_symbol] pub unsafe extern "C" fn rust_eh_unregister_frames(eh_frame_begin: *const u8, object: *mut u8) { __deregister_frame_info(eh_frame_begin, object); } diff --git a/src/libpanic_unwind/lib.rs b/src/libpanic_unwind/lib.rs index 87d24841d04..20331e8808c 100644 --- a/src/libpanic_unwind/lib.rs +++ b/src/libpanic_unwind/lib.rs @@ -72,7 +72,7 @@ extern "C" { mod dwarf; -#[no_mangle] +#[rustc_std_internal_symbol] pub unsafe extern "C" fn __rust_panic_cleanup( payload: TryPayload, ) -> *mut (dyn Any + Send + 'static) { @@ -81,7 +81,7 @@ pub unsafe extern "C" fn __rust_panic_cleanup( // Entry point for raising an exception, just delegates to the platform-specific // implementation. -#[no_mangle] +#[rustc_std_internal_symbol] #[unwind(allowed)] pub unsafe extern "C" fn __rust_start_panic(payload: usize) -> u32 { let payload = payload as *mut &mut dyn BoxMeUp; |
