@@ -910,13 +910,15 @@ pub fn heap_start() -> *mut u32 {
910
910
911
911
// Entry point is Reset.
912
912
#[ doc( hidden) ]
913
- #[ link_section = ".vector_table.reset_vector" ]
913
+ #[ cfg_attr( target_os = "macos" , link_section = ".vector_table,reset_vector" ) ]
914
+ #[ cfg_attr( not( target_os = "macos" ) , link_section = ".vector_table.reset_vector" ) ]
914
915
#[ no_mangle]
915
916
pub static __RESET_VECTOR: unsafe extern "C" fn ( ) -> ! = Reset ;
916
917
917
918
#[ allow( unused_variables) ]
918
919
#[ doc( hidden) ]
919
- #[ link_section = ".HardFault.default" ]
920
+ #[ cfg_attr( target_os = "macos" , link_section = ".HardFault,default" ) ]
921
+ #[ cfg_attr( not( target_os = "macos" ) , link_section = ".HardFault.default" ) ]
920
922
#[ no_mangle]
921
923
pub unsafe extern "C" fn HardFault_ ( ef : & ExceptionFrame ) -> ! {
922
924
loop {
@@ -1008,7 +1010,8 @@ pub union Vector {
1008
1010
}
1009
1011
1010
1012
#[ doc( hidden) ]
1011
- #[ link_section = ".vector_table.exceptions" ]
1013
+ #[ cfg_attr( target_os = "macos" , link_section = ".vector_table,exceptions" ) ]
1014
+ #[ cfg_attr( not( target_os = "macos" ) , link_section = ".vector_table.exceptions" ) ]
1012
1015
#[ no_mangle]
1013
1016
pub static __EXCEPTIONS: [ Vector ; 14 ] = [
1014
1017
// Exception 2: Non Maskable Interrupt.
@@ -1070,7 +1073,8 @@ pub static __EXCEPTIONS: [Vector; 14] = [
1070
1073
// to the default handler
1071
1074
#[ cfg( all( any( not( feature = "device" ) , test) , not( armv6m) ) ) ]
1072
1075
#[ doc( hidden) ]
1073
- #[ link_section = ".vector_table.interrupts" ]
1076
+ #[ cfg_attr( target_os = "macos" , link_section = ".vector_table,interrupts" ) ]
1077
+ #[ cfg_attr( not( target_os = "macos" ) , link_section = ".vector_table.interrupts" ) ]
1074
1078
#[ no_mangle]
1075
1079
pub static __INTERRUPTS: [ unsafe extern "C" fn ( ) ; 240 ] = [ {
1076
1080
extern "C" {
0 commit comments