File tree 2 files changed +12
-2
lines changed
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 1
1
INCLUDE memory.x
2
2
3
+ /* With multiple codegen units the rlib produced for this crate has several object files in it. */
4
+ /* Because the linker is Smart it may not look into all the object files and not pick up the */
5
+ /* .vector_table.exceptions section. But we want it to! To workaround the problem we create an */
6
+ /* undefined reference to the EXCEPTIONS symbol (located in .vector_table.exceptions); this way the */
7
+ /* linker will look at all the object of the rlib and pick up our EXCEPTIONS symbol */
8
+ EXTERN (EXCEPTIONS );
9
+
3
10
/* Create an undefined reference to the INTERRUPTS symbol. This is required to
4
11
force the linker to *not* drop the INTERRUPTS symbol if it comes from an
5
12
object file that's passed to the linker *before* this crate */
Original file line number Diff line number Diff line change @@ -410,10 +410,13 @@ extern "C" {
410
410
fn SYS_TICK ( ) ;
411
411
}
412
412
413
+ #[ allow( private_no_mangle_statics) ]
413
414
#[ cfg( target_arch = "arm" ) ]
414
- #[ used ]
415
+ #[ doc ( hidden ) ]
415
416
#[ link_section = ".vector_table.exceptions" ]
416
- static EXCEPTIONS : [ Option < unsafe extern "C" fn ( ) > ; 14 ] = [
417
+ #[ no_mangle]
418
+ #[ used]
419
+ pub static EXCEPTIONS : [ Option < unsafe extern "C" fn ( ) > ; 14 ] = [
417
420
Some ( NMI ) ,
418
421
Some ( HARD_FAULT ) ,
419
422
Some ( MEM_MANAGE ) ,
You can’t perform that action at this time.
0 commit comments