Skip to content

Commit bbf14f3

Browse files
authored
Merge pull request #478 from Lokathor/weak-linkage-for-division
2 parents 6a84c6b + c2a9124 commit bbf14f3

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+
#[cfg_attr(all(not(windows), not(target_vendor="apple")), 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+
#[cfg_attr(all(not(windows), not(target_vendor="apple")), 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+
#[cfg_attr(all(not(windows), not(target_vendor="apple")), 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+
#[cfg_attr(all(not(windows), not(target_vendor="apple")), linkage = "weak")]
6872
pub unsafe extern "C" fn __aeabi_ldivmod() {
6973
core::arch::asm!(
7074
"push {{r4, lr}}",

0 commit comments

Comments
 (0)