diff options
Diffstat (limited to 'cortex-m-rt/macros/src')
-rw-r--r-- | cortex-m-rt/macros/src/lib.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cortex-m-rt/macros/src/lib.rs b/cortex-m-rt/macros/src/lib.rs index 74041ef..fe0264f 100644 --- a/cortex-m-rt/macros/src/lib.rs +++ b/cortex-m-rt/macros/src/lib.rs @@ -278,8 +278,10 @@ pub fn exception(args: TokenStream, input: TokenStream) -> TokenStream { #(#attrs)* #[doc(hidden)] #[export_name = "HardFault"] - #[cfg_attr(target_os = "macos", link_section = ".HardFault,user")] - #[cfg_attr(not(target_os = "macos"), link_section = ".HardFault.user")] + // Only emit link_section when building for embedded targets, + // because some hosted platforms (used to check the build) + // cannot handle the long link section names. + #[cfg_attr(target_os = "none", link_section = ".HardFault.user")] pub unsafe extern "C" fn #tramp_ident(frame: &::cortex_m_rt::ExceptionFrame) { #ident(frame) } |