From adecf626f023ee974e502703bdd024aceb9c7678 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Tue, 20 Dec 2016 15:46:12 -0800 Subject: Avoid jal to weak symbols The symbol may be overridden and end up out of range of JAL. --- bsp/env/entry.S | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bsp/env/entry.S b/bsp/env/entry.S index cbf26eb..b433628 100644 --- a/bsp/env/entry.S +++ b/bsp/env/entry.S @@ -46,7 +46,7 @@ trap_entry: csrr a0, mcause csrr a1, mepc mv a2, sp - jal handle_trap + call handle_trap csrw mepc, a0 # Remain in M-mode after mret @@ -90,6 +90,7 @@ trap_entry: .weak handle_trap handle_trap: - j handle_trap +1: + j 1b #endif -- cgit v1.2.3