aboutsummaryrefslogtreecommitdiff
path: root/cortex-m-rt/src
diff options
context:
space:
mode:
authorGravatar Anatol Ulrich <anatol.ulrich@ferrous-systems.com> 2021-01-25 22:25:08 +0100
committerGravatar Anatol Ulrich <anatol.ulrich@ferrous-systems.com> 2021-01-25 22:25:08 +0100
commit95b28372d743be9dbe35f23f6c31a4f1d5340d60 (patch)
treef390501f4246043d71c393515e38979694e18ec0 /cortex-m-rt/src
parent4bb29e702b650e7cc245d21dc33b5ce1d44b3147 (diff)
downloadcortex-m-95b28372d743be9dbe35f23f6c31a4f1d5340d60.tar.gz
cortex-m-95b28372d743be9dbe35f23f6c31a4f1d5340d60.tar.zst
cortex-m-95b28372d743be9dbe35f23f6c31a4f1d5340d60.zip
fix #74
Diffstat (limited to 'cortex-m-rt/src')
-rw-r--r--cortex-m-rt/src/lib.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/cortex-m-rt/src/lib.rs b/cortex-m-rt/src/lib.rs
index e5e290d..93125b7 100644
--- a/cortex-m-rt/src/lib.rs
+++ b/cortex-m-rt/src/lib.rs
@@ -910,13 +910,15 @@ pub fn heap_start() -> *mut u32 {
// Entry point is Reset.
#[doc(hidden)]
-#[link_section = ".vector_table.reset_vector"]
+#[cfg_attr(target_os = "macos", link_section = ".vector_table,reset_vector")]
+#[cfg_attr(not(target_os = "macos"), link_section = ".vector_table.reset_vector")]
#[no_mangle]
pub static __RESET_VECTOR: unsafe extern "C" fn() -> ! = Reset;
#[allow(unused_variables)]
#[doc(hidden)]
-#[link_section = ".HardFault.default"]
+#[cfg_attr(target_os = "macos", link_section = ".HardFault,default")]
+#[cfg_attr(not(target_os = "macos"), link_section = ".HardFault.default")]
#[no_mangle]
pub unsafe extern "C" fn HardFault_(ef: &ExceptionFrame) -> ! {
loop {
@@ -1008,7 +1010,8 @@ pub union Vector {
}
#[doc(hidden)]
-#[link_section = ".vector_table.exceptions"]
+#[cfg_attr(target_os = "macos", link_section = ".vector_table,exceptions")]
+#[cfg_attr(not(target_os = "macos"), link_section = ".vector_table.exceptions")]
#[no_mangle]
pub static __EXCEPTIONS: [Vector; 14] = [
// Exception 2: Non Maskable Interrupt.
@@ -1070,7 +1073,8 @@ pub static __EXCEPTIONS: [Vector; 14] = [
// to the default handler
#[cfg(all(any(not(feature = "device"), test), not(armv6m)))]
#[doc(hidden)]
-#[link_section = ".vector_table.interrupts"]
+#[cfg_attr(target_os = "macos", link_section = ".vector_table,interrupts")]
+#[cfg_attr(not(target_os = "macos"), link_section = ".vector_table.interrupts")]
#[no_mangle]
pub static __INTERRUPTS: [unsafe extern "C" fn(); 240] = [{
extern "C" {