Verified Commit b3d71ba8 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Make relibc_panic a weakly linked stub for crt and ld_so objects

parent 7f7d73de
Pipeline #9583 failed with stages
in 56 seconds
......@@ -28,12 +28,15 @@ pub unsafe extern "C" fn _start() {
);
}
#[linkage = "weak"]
#[no_mangle]
extern "C" fn relibc_panic(pi: &::core::panic::PanicInfo) -> ! {
loop {}
}
#[panic_handler]
#[linkage = "weak"]
#[no_mangle]
pub unsafe extern "C" fn rust_begin_unwind(pi: &::core::panic::PanicInfo) -> ! {
extern "C" {
fn relibc_panic(pi: &::core::panic::PanicInfo) -> !;
}
relibc_panic(pi)
}
......@@ -49,12 +49,15 @@ global_asm!(
"#
);
#[linkage = "weak"]
#[no_mangle]
extern "C" fn relibc_panic(pi: &::core::panic::PanicInfo) -> ! {
loop {}
}
#[panic_handler]
#[linkage = "weak"]
#[no_mangle]
pub unsafe extern "C" fn rust_begin_unwind(pi: &::core::panic::PanicInfo) -> ! {
extern "C" {
fn relibc_panic(pi: &::core::panic::PanicInfo) -> !;
}
relibc_panic(pi)
}
......@@ -39,12 +39,15 @@ global_asm!(
"#
);
#[linkage = "weak"]
#[no_mangle]
extern "C" fn relibc_panic(pi: &::core::panic::PanicInfo) -> ! {
loop {}
}
#[panic_handler]
#[linkage = "weak"]
#[no_mangle]
pub unsafe extern "C" fn rust_begin_unwind(pi: &::core::panic::PanicInfo) -> ! {
extern "C" {
fn relibc_panic(pi: &::core::panic::PanicInfo) -> !;
}
relibc_panic(pi)
}
......@@ -60,12 +60,15 @@ pub unsafe extern "C" fn main(_argc: isize, _argv: *const *const i8) -> usize {
0x1D
}
#[linkage = "weak"]
#[no_mangle]
extern "C" fn relibc_panic(pi: &::core::panic::PanicInfo) -> ! {
loop {}
}
#[panic_handler]
#[linkage = "weak"]
#[no_mangle]
pub unsafe extern "C" fn rust_begin_unwind(pi: &::core::panic::PanicInfo) -> ! {
extern "C" {
fn relibc_panic(pi: &::core::panic::PanicInfo) -> !;
}
relibc_panic(pi)
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment