Skip to content

Commit daeaf18

Browse files
committed
Trap handler override improvments
* Add ability to override trap handling mechanism * Previously, `_start_trap` was marked as weak, which when compiled into a static archive, that information is ignored. * Now by default we `PROVIDE` the default trap handler, if another one has not been specified from another crate. * Mark the fields of `Vector` public, for use outside of `riscv-rt`
1 parent 629737e commit daeaf18

27 files changed

+11
-6
lines changed

riscv-rt/asm.S

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,9 @@ _abs_start:
124124
restores caller saved registers and then returns.
125125
*/
126126
.section .trap, "ax"
127-
.global _start_trap
128-
/* Make it .weak so PAC/HAL can provide their own if needed. */
129-
.weak _start_trap
127+
.global default_start_trap
130128

131-
_start_trap:
129+
default_start_trap:
132130
addi sp, sp, -16*REGBYTES
133131

134132
STORE ra, 0*REGBYTES(sp)
32 Bytes
Binary file not shown.
28 Bytes
Binary file not shown.
32 Bytes
Binary file not shown.
28 Bytes
Binary file not shown.
32 Bytes
Binary file not shown.
28 Bytes
Binary file not shown.
32 Bytes
Binary file not shown.
28 Bytes
Binary file not shown.
32 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)