diff options
author | 2021-01-26 16:22:25 +0000 | |
---|---|---|
committer | 2021-01-26 16:22:25 +0000 | |
commit | 9a8885f4f75d10d18506d13041c80952b9a5a4a2 (patch) | |
tree | 20e0953710876ae0d705c2161aac917fc55d5962 /cortex-m-rt/macros/src | |
parent | 272ee3d30a3227ee45ff11c5c7c0134916a40525 (diff) | |
parent | b45a5b6bcada5a1e22efbbecaa5ea23e244b56f6 (diff) | |
download | cortex-m-9a8885f4f75d10d18506d13041c80952b9a5a4a2.tar.gz cortex-m-9a8885f4f75d10d18506d13041c80952b9a5a4a2.tar.zst cortex-m-9a8885f4f75d10d18506d13041c80952b9a5a4a2.zip |
Merge #306
306: fix #74 r=jonas-schievink a=spookyvision
special-cased linker section names to satisfy macos linker constraints
Co-authored-by: Anatol Ulrich <anatol.ulrich@ferrous-systems.com>
Diffstat (limited to 'cortex-m-rt/macros/src')
-rw-r--r-- | cortex-m-rt/macros/src/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cortex-m-rt/macros/src/lib.rs b/cortex-m-rt/macros/src/lib.rs index 7e54a5c..a486558 100644 --- a/cortex-m-rt/macros/src/lib.rs +++ b/cortex-m-rt/macros/src/lib.rs @@ -266,7 +266,8 @@ pub fn exception(args: TokenStream, input: TokenStream) -> TokenStream { #(#attrs)* #[doc(hidden)] #[export_name = "HardFault"] - #[link_section = ".HardFault.user"] + #[cfg_attr(target_os = "macos", link_section = ".HardFault,user")] + #[cfg_attr(not(target_os = "macos"), link_section = ".HardFault.user")] pub unsafe extern "C" fn #tramp_ident(frame: &::cortex_m_rt::ExceptionFrame) { #ident(frame) } |