restrict linkage to platforms using ELF binaries
on windows and apple (which don't use ELF) we can't apply weak linkage
This commit is contained in:
parent
1070134a56
commit
8568a33255
1 changed files with 4 additions and 4 deletions
|
|
@ -22,7 +22,7 @@ intrinsics! {
|
|||
// custom calling convention which can't be implemented using a normal Rust function.
|
||||
#[naked]
|
||||
#[cfg(not(target_env = "msvc"))]
|
||||
#[linkage = "weak"]
|
||||
#[cfg_attr(all(not(windows), not(target_vendor="apple")), linkage = "weak")]
|
||||
pub unsafe extern "C" fn __aeabi_uidivmod() {
|
||||
core::arch::asm!(
|
||||
"push {{lr}}",
|
||||
|
|
@ -37,7 +37,7 @@ intrinsics! {
|
|||
}
|
||||
|
||||
#[naked]
|
||||
#[linkage = "weak"]
|
||||
#[cfg_attr(all(not(windows), not(target_vendor="apple")), linkage = "weak")]
|
||||
pub unsafe extern "C" fn __aeabi_uldivmod() {
|
||||
core::arch::asm!(
|
||||
"push {{r4, lr}}",
|
||||
|
|
@ -54,7 +54,7 @@ intrinsics! {
|
|||
}
|
||||
|
||||
#[naked]
|
||||
#[linkage = "weak"]
|
||||
#[cfg_attr(all(not(windows), not(target_vendor="apple")), linkage = "weak")]
|
||||
pub unsafe extern "C" fn __aeabi_idivmod() {
|
||||
core::arch::asm!(
|
||||
"push {{r0, r1, r4, lr}}",
|
||||
|
|
@ -68,7 +68,7 @@ intrinsics! {
|
|||
}
|
||||
|
||||
#[naked]
|
||||
#[linkage = "weak"]
|
||||
#[cfg_attr(all(not(windows), not(target_vendor="apple")), linkage = "weak")]
|
||||
pub unsafe extern "C" fn __aeabi_ldivmod() {
|
||||
core::arch::asm!(
|
||||
"push {{r4, lr}}",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue