add weak linkage to the ARM AEABI division functions

This commit is contained in:
Lokathor 2022-07-22 17:14:18 -06:00 committed by GitHub
parent 5e48419836
commit 011f92c877
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,6 +22,7 @@ intrinsics! {
// custom calling convention which can't be implemented using a normal Rust function.
#[naked]
#[cfg(not(target_env = "msvc"))]
#[linkage = "weak"]
pub unsafe extern "C" fn __aeabi_uidivmod() {
core::arch::asm!(
"push {{lr}}",
@ -36,6 +37,7 @@ intrinsics! {
}
#[naked]
#[linkage = "weak"]
pub unsafe extern "C" fn __aeabi_uldivmod() {
core::arch::asm!(
"push {{r4, lr}}",
@ -52,6 +54,7 @@ intrinsics! {
}
#[naked]
#[linkage = "weak"]
pub unsafe extern "C" fn __aeabi_idivmod() {
core::arch::asm!(
"push {{r0, r1, r4, lr}}",
@ -65,6 +68,7 @@ intrinsics! {
}
#[naked]
#[linkage = "weak"]
pub unsafe extern "C" fn __aeabi_ldivmod() {
core::arch::asm!(
"push {{r4, lr}}",