diff --git a/mips-rt/link.x b/mips-rt/link.x index dcc1852..989ac6b 100644 --- a/mips-rt/link.x +++ b/mips-rt/link.x @@ -12,10 +12,6 @@ INCLUDE memory.x /* The entry point is the reset handler */ ENTRY(_reset); -/* default handlers for general exception and NMI */ -PROVIDE(_general_exception_handler = _default_isr_fn); -PROVIDE(_nmi_handler = _default_isr_fn); - /* stack */ PROVIDE(_stack = ORIGIN(data_mem) + LENGTH(data_mem)); diff --git a/mips-rt/native_lib/exception_table.S b/mips-rt/native_lib/exception_table.S index d6e9cf1..48be767 100644 --- a/mips-rt/native_lib/exception_table.S +++ b/mips-rt/native_lib/exception_table.S @@ -16,6 +16,12 @@ _default_isr_fn: nop .end _default_isr_fn +.weak _general_exception_handler +_general_exception_handler = _default_isr_fn + +.weak _nmi_handler +_nmi_handler = _default_isr_fn + # General Exception .section .gen_handler, "ax" .ent _gen_exception diff --git a/mips-rt/native_lib/libmips-rt.a b/mips-rt/native_lib/libmips-rt.a index 7687262..e1f7d7d 100644 Binary files a/mips-rt/native_lib/libmips-rt.a and b/mips-rt/native_lib/libmips-rt.a differ