]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
riscv: spl: Remove relocation sections
authorBin Meng <bmeng@tinylab.org>
Thu, 13 Apr 2023 06:20:07 +0000 (14:20 +0800)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Thu, 20 Apr 2023 12:45:08 +0000 (20:45 +0800)
U-Boot SPL is not relocable. Drop these relocation sections.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
arch/riscv/cpu/start.S
arch/riscv/cpu/u-boot-spl.lds

index 8cf25bb14a6ecb6fe1fa1042138b23cb9ecad608..dad22bfea877a40c95527f594ad680fdd0a0e3b1 100644 (file)
@@ -253,6 +253,7 @@ spl_call_board_init_r:
        j       board_init_r
 #endif
 
+#if !defined(CONFIG_SPL_BUILD)
 /*
  * void relocate_code(addr_sp, gd, addr_moni)
  *
@@ -400,6 +401,7 @@ call_board_init_r:
  * jump to it ...
  */
        jr      t4                      /* jump to board_init_r() */
+#endif /* !defined(CONFIG_SPL_BUILD) */
 
 #if CONFIG_IS_ENABLED(SMP)
 hart_out_of_bounds_loop:
index 993536302a2756d7f221a5f2278a59a09e4fdbfa..c3b490790560bfbb95960d72a5699af00863d1b3 100644 (file)
@@ -32,14 +32,6 @@ SECTIONS
        } > .spl_mem
        . = ALIGN(4);
 
-       .got : {
-               __got_start = .;
-               *(.got.plt) *(.got)
-               __got_end = .;
-       } > .spl_mem
-
-       . = ALIGN(4);
-
        __u_boot_list : {
                KEEP(*(SORT(__u_boot_list*)));
        } > .spl_mem
@@ -54,23 +46,6 @@ SECTIONS
 
        . = ALIGN(4);
 
-       /DISCARD/ : { *(.rela.plt*) }
-       .rela.dyn : {
-               __rel_dyn_start = .;
-               *(.rela*)
-               __rel_dyn_end = .;
-       } > .spl_mem
-
-       . = ALIGN(4);
-
-       .dynsym : {
-               __dyn_sym_start = .;
-               *(.dynsym)
-               __dyn_sym_end = .;
-       } > .spl_mem
-
-       . = ALIGN(4);
-
        _end = .;
        _image_binary_end = .;