diff mbox series

[2/2] firmware: always create dynsym section

Message ID 20240126152145.60488-2-leon@georgemail.eu
State Accepted
Headers show
Series [1/2] check for --exclude-libs | expand

Commit Message

Leon Busch-George Jan. 26, 2024, 3:21 p.m. UTC
With a bare-metal linkers (e.g. riscv64-elf-ld), there exists no dynsym section.
The dynsym section is not used by OpenSBI but discarding it makes linkers with dynamic library support unhappy.
---
 firmware/fw_base.ldS | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Anup Patel Feb. 5, 2024, 11:13 a.m. UTC | #1
On Fri, Jan 26, 2024 at 8:52 PM Leon M. Busch-George <leon@georgemail.eu> wrote:
>
> With a bare-metal linkers (e.g. riscv64-elf-ld), there exists no dynsym section.
> The dynsym section is not used by OpenSBI but discarding it makes linkers with dynamic library support unhappy.

There is no Signed-off-by  in the commit description.

I have taken care of the above at the time of merging this patch.

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

Applied this patch to the riscv/opensbi repo.

Thanks,
Anup

> ---
>  firmware/fw_base.ldS | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/firmware/fw_base.ldS b/firmware/fw_base.ldS
> index c15ccdb..fb47984 100644
> --- a/firmware/fw_base.ldS
> +++ b/firmware/fw_base.ldS
> @@ -38,6 +38,11 @@
>                 . = ALIGN(8);
>         }
>
> +       .dynsym :
> +       {
> +               *(.dynsym)
> +       }
> +
>         . = ALIGN(0x1000); /* Ensure next section is page aligned */
>
>         .rela.dyn : {
> --
> 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.ldS b/firmware/fw_base.ldS
index c15ccdb..fb47984 100644
--- a/firmware/fw_base.ldS
+++ b/firmware/fw_base.ldS
@@ -38,6 +38,11 @@ 
 		. = ALIGN(8);
 	}
 
+	.dynsym :
+	{
+		*(.dynsym)
+	}
+
 	. = ALIGN(0x1000); /* Ensure next section is page aligned */
 
 	.rela.dyn : {