4
0
Эх сурвалжийг харах

Merge pull request #117 from onsdagens/global_asm_link

Fix oor branch via linking
Román Cárdenas Rodríguez 1 жил өмнө
parent
commit
c861d19af3

+ 0 - 1
riscv-rt/.github/workflows/build.yaml

@@ -47,4 +47,3 @@ jobs:
     if: always()
     steps:
       - run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
-  

+ 1 - 1
riscv-rt/link.x

@@ -57,7 +57,7 @@ SECTIONS
     . = ALIGN(4);
     *(.trap);
     *(.trap.rust);
-
+    *(.text.abort);
     *(.text .text.*);
   } > REGION_TEXT
 

+ 1 - 5
riscv-rt/src/asm.rs

@@ -92,11 +92,7 @@ _abs_start:
     "csrr t2, mhartid",
     "lui t0, %hi(_max_hart_id)
     add t0, t0, %lo(_max_hart_id)
-    // bgtu t2, t0, abort
-    bleu t2, t0, not_abort
-    la t0, abort
-    jr t0
-    not_abort:
+    bgtu t2, t0, abort
 
     // Allocate stacks
     la sp, _stack_start