diff options
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/alloc.rs | 1 | ||||
| -rw-r--r-- | library/std/src/panicking.rs | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/library/std/src/alloc.rs b/library/std/src/alloc.rs index 99d105a2454..5d2a304b41c 100644 --- a/library/std/src/alloc.rs +++ b/library/std/src/alloc.rs @@ -348,6 +348,7 @@ fn default_alloc_error_hook(layout: Layout) { unsafe extern "Rust" { // This symbol is emitted by rustc next to __rust_alloc_error_handler. // Its value depends on the -Zoom={panic,abort} compiler option. + #[cfg_attr(not(bootstrap), rustc_std_internal_symbol)] static __rust_alloc_error_handler_should_panic: u8; } diff --git a/library/std/src/panicking.rs b/library/std/src/panicking.rs index b47b41d4bc5..b35549c92ad 100644 --- a/library/std/src/panicking.rs +++ b/library/std/src/panicking.rs @@ -55,12 +55,14 @@ pub static EMPTY_PANIC: fn(&'static str) -> ! = // hook up these functions, but it is not this day! #[allow(improper_ctypes)] unsafe extern "C" { + #[cfg_attr(not(bootstrap), rustc_std_internal_symbol)] fn __rust_panic_cleanup(payload: *mut u8) -> *mut (dyn Any + Send + 'static); } unsafe extern "Rust" { /// `PanicPayload` lazily performs allocation only when needed (this avoids /// allocations when using the "abort" panic runtime). + #[cfg_attr(not(bootstrap), rustc_std_internal_symbol)] fn __rust_start_panic(payload: &mut dyn PanicPayload) -> u32; } |
