Re: [PATCH 7/8] riscv: spl: Remove relocation sections

2023-04-10 Thread Rick Chen
> From: Bin Meng 
> Sent: Thursday, March 30, 2023 12:20 PM
> To: u-boot@lists.denx.de
> Cc: Andrew Scull ; Leo Yu-Chi Liang(梁育齊) 
> ; Rick Jian-Zhi Chen(陳建志) ; Simon 
> Glass 
> Subject: [PATCH 7/8] riscv: spl: Remove relocation sections
>
> U-Boot SPL is not relocable. Drop these relocation sections.
>
> Signed-off-by: Bin Meng 
> ---
>
>  arch/riscv/cpu/u-boot-spl.lds | 25 -
>  1 file changed, 25 deletions(-)
>
> diff --git a/arch/riscv/cpu/u-boot-spl.lds b/arch/riscv/cpu/u-boot-spl.lds 
> index 993536302a..c3b4907905 100644
> --- a/arch/riscv/cpu/u-boot-spl.lds
> +++ b/arch/riscv/cpu/u-boot-spl.lds
> @@ -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

This patch will cause u-boot-spl build fail:

...
LD  spl/u-boot-spl
riscv64-linux-ld.bfd: arch/riscv/cpu/start.o: in function `fix_rela_dyn':
/home/u-boot-riscv/arch/riscv/cpu/start.S:299: undefined reference to
`__rel_dyn_start'
riscv64-linux-ld.bfd: arch/riscv/cpu/start.o: in function `.L0 ':

Thanks,
Rick

> -
> -   . = ALIGN(4);
> -
> -   .dynsym : {
> -   __dyn_sym_start = .;
> -   *(.dynsym)
> -   __dyn_sym_end = .;
> -   } > .spl_mem
> -
> -   . = ALIGN(4);
> -
> _end = .;
> _image_binary_end = .;
>
> --
> 2.34.1


[PATCH 7/8] riscv: spl: Remove relocation sections

2023-03-30 Thread Bin Meng
U-Boot SPL is not relocable. Drop these relocation sections.

Signed-off-by: Bin Meng 
---

 arch/riscv/cpu/u-boot-spl.lds | 25 -
 1 file changed, 25 deletions(-)

diff --git a/arch/riscv/cpu/u-boot-spl.lds b/arch/riscv/cpu/u-boot-spl.lds
index 993536302a..c3b4907905 100644
--- a/arch/riscv/cpu/u-boot-spl.lds
+++ b/arch/riscv/cpu/u-boot-spl.lds
@@ -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 = .;
 
-- 
2.34.1