diff --git a/link.lds b/link.lds index 09fd922..f335267 100644 --- a/link.lds +++ b/link.lds @@ -7,6 +7,10 @@ SECTIONS *(.text) PROVIDE(_text_end = .); } + .rodata : { + *(.rodata) + *(.rodata.*) + } . = ALIGN(8); .data : { PROVIDE(_data_start = .); diff --git a/start.S b/start.S index 65dbd8d..a116f9a 100644 --- a/start.S +++ b/start.S @@ -1,11 +1,14 @@ #include "riscv_asm.h" #include "riscv_encoding.h" +.global _start +.type _start, @function + .global _load_start #define BOOT_STATUS_RELOCATE_DONE 1 -entry: +_start: /* * Clear L1 cache & BTB & BHT ... */ @@ -31,7 +34,7 @@ entry: */ lla t0, _load_start REG_L t2, 0(t0) - lla t1, entry + lla t1, _start REG_S t1, 0(t0) /*