diff mbox series

[v3,05/10] firmware: fw_base.S: Move _link_start to .rodata section

Message ID 20240117104212.1055737-6-wxjstz@126.com
State Changes Requested
Headers show
Series Improvements to fw_base.S | expand

Commit Message

Xiang W Jan. 17, 2024, 10:42 a.m. UTC
_link_start is readonly, so move it to rodata section.

Signed-off-by: Xiang W <wxjstz@126.com>
---
 firmware/fw_base.S | 3 +++
 1 file changed, 3 insertions(+)

Comments

Anup Patel Feb. 6, 2024, 7:26 a.m. UTC | #1
On Wed, Jan 17, 2024 at 4:12 PM Xiang W <wxjstz@126.com> wrote:
>
> _link_start is readonly, so move it to rodata section.
>
> Signed-off-by: Xiang W <wxjstz@126.com>

Looks good to me.

Reviewed-by: Anup Patel <anup@brainfault.org>

Regards,
Anup

> ---
>  firmware/fw_base.S | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/firmware/fw_base.S b/firmware/fw_base.S
> index 18dd0c5..7c7157d 100644
> --- a/firmware/fw_base.S
> +++ b/firmware/fw_base.S
> @@ -482,6 +482,9 @@ _relocate_lottery:
>         RISCV_PTR       0
>  _boot_status:
>         RISCV_PTR       0
> +
> +       .section .rodata
> +       .align 3
>  _link_start:
>         RISCV_PTR       FW_TEXT_START
>
> --
> 2.43.0
>
>
> --
> opensbi mailing list
> opensbi@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/opensbi
diff mbox series

Patch

diff --git a/firmware/fw_base.S b/firmware/fw_base.S
index 18dd0c5..7c7157d 100644
--- a/firmware/fw_base.S
+++ b/firmware/fw_base.S
@@ -482,6 +482,9 @@  _relocate_lottery:
 	RISCV_PTR	0
 _boot_status:
 	RISCV_PTR	0
+
+	.section .rodata
+	.align 3
 _link_start:
 	RISCV_PTR	FW_TEXT_START