@@ -30,6 +30,10 @@ PROVIDE(_heap_size = 0);
3030
3131/** TRAP ENTRY POINTS **/
3232
33+ /* Default abort entry point. If no abort symbol is provided, then abort maps to _abort. */
34+ EXTERN(_abort);
35+ PROVIDE(abort = _abort);
36+
3337/* Default trap entry point. The riscv-rt crate provides a weak alias of this function,
3438 which saves caller saved registers, calls _start_trap_rust, restores caller saved registers
3539 and then returns. Users can override this alias by defining the symbol themselves */
@@ -54,7 +58,7 @@ PROVIDE(_start_MachineExternal_trap = _start_DefaultHandler_trap);
5458
5559/* Default exception handler. The riscv-rt crate provides a weak alias of this function,
5660 which is a busy loop. Users can override this alias by defining the symbol themselves */
57- EXTERN (ExceptionHandler);
61+ PROVIDE (ExceptionHandler = abort );
5862
5963/* It is possible to define a special handler for each exception type.
6064 By default, all exceptions are handled by ExceptionHandler. However, users can
@@ -76,13 +80,10 @@ PROVIDE(StorePageFault = ExceptionHandler);
7680
7781/** INTERRUPT HANDLERS **/
7882
79- /* Default interrupt handler. The riscv-rt crate provides a weak alias of this function,
80- which is a busy loop. Users can override this alias by defining the symbol themselves */
81- EXTERN(DefaultHandler);
82-
8383/* It is possible to define a special handler for each interrupt type.
8484 By default, all interrupts are handled by DefaultHandler. However, users can
8585 override these alias by defining the symbol themselves */
86+ PROVIDE(DefaultHandler = abort);
8687PROVIDE(SupervisorSoft = DefaultHandler);
8788PROVIDE(MachineSoft = DefaultHandler);
8889PROVIDE(SupervisorTimer = DefaultHandler);
0 commit comments