Skip to content

Commit f823dd9

Browse files
committed
fix oor branch via linking
1 parent a949316 commit f823dd9

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

riscv-rt/link.x

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ SECTIONS
5555
KEEP(*(.init));
5656
KEEP(*(.init.rust));
5757
. = ALIGN(4);
58+
*(.abort)
5859
*(.trap);
5960
*(.trap.rust);
6061

riscv-rt/src/asm.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,7 @@ _abs_start:
9292
"csrr t2, mhartid",
9393
"lui t0, %hi(_max_hart_id)
9494
add t0, t0, %lo(_max_hart_id)
95-
// bgtu t2, t0, abort
96-
bleu t2, t0, not_abort
97-
la t0, abort
98-
jr t0
99-
not_abort:
95+
bgtu t2, t0, abort
10096
10197
// Allocate stacks
10298
la sp, _stack_start

0 commit comments

Comments
 (0)