Skip to content

Commit 3d34329

Browse files
authored
add weak linkage to the ARM AEABI division functions
1 parent 3872a7c commit 3d34329

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/arm.rs

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ intrinsics! {
2222
// custom calling convention which can't be implemented using a normal Rust function.
2323
#[naked]
2424
#[cfg(not(target_env = "msvc"))]
25+
#[linkage = "weak"]
2526
pub unsafe extern "C" fn __aeabi_uidivmod() {
2627
core::arch::asm!(
2728
"push {{lr}}",
@@ -36,6 +37,7 @@ intrinsics! {
3637
}
3738

3839
#[naked]
40+
#[linkage = "weak"]
3941
pub unsafe extern "C" fn __aeabi_uldivmod() {
4042
core::arch::asm!(
4143
"push {{r4, lr}}",
@@ -52,6 +54,7 @@ intrinsics! {
5254
}
5355

5456
#[naked]
57+
#[linkage = "weak"]
5558
pub unsafe extern "C" fn __aeabi_idivmod() {
5659
core::arch::asm!(
5760
"push {{r0, r1, r4, lr}}",
@@ -65,6 +68,7 @@ intrinsics! {
6568
}
6669

6770
#[naked]
71+
#[linkage = "weak"]
6872
pub unsafe extern "C" fn __aeabi_ldivmod() {
6973
core::arch::asm!(
7074
"push {{r4, lr}}",

0 commit comments

Comments
 (0)