Skip to content

Commit dbd0f6c

Browse files
author
Anatol Ulrich
committed
fix .HardFault.user section name for macos
1 parent 7676b83 commit dbd0f6c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cortex-m-rt/macros/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,8 @@ pub fn exception(args: TokenStream, input: TokenStream) -> TokenStream {
266266
#(#attrs)*
267267
#[doc(hidden)]
268268
#[export_name = "HardFault"]
269-
#[link_section = ".HardFault.user"]
269+
#[cfg_attr(target_os = "macos", link_section = ".HardFault,user")]
270+
#[cfg_attr(not(target_os = "macos"), link_section = ".HardFault.user")]
270271
pub unsafe extern "C" fn #tramp_ident(frame: &::cortex_m_rt::ExceptionFrame) {
271272
#ident(frame)
272273
}

0 commit comments

Comments
 (0)