[PATCH 3/3] Makefile: Add --exclude-libs ALL to avoid .dynsym
Anup Patel
anup at brainfault.org
Thu Oct 5 21:14:59 PDT 2023
On Sun, Sep 17, 2023 at 11:23 PM Vivian Wang <dramforever at live.com> wrote:
>
> Since everything is statically linked, we don't need to expose symbols
> for dynamic linking.
>
> For a default build this saves about 2 KiB of useless read only data in
> .dynsym, .dynstr, .hash, .gnu.hash sections.
>
> Signed-off-by: Vivian Wang <dramforever at live.com>
Looks good to me.
Reviewed-by: Anup Patel <anup at brainfault.org>
Thanks,
Anup
> ---
> Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Makefile b/Makefile
> index ca70949..de4e73a 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -375,6 +375,7 @@ ASFLAGS += $(firmware-asflags-y)
> ARFLAGS = rcs
>
> ELFFLAGS += $(USE_LD_FLAG)
> +ELFFLAGS += -Wl,--exclude-libs,ALL
> ELFFLAGS += -Wl,--build-id=none
> ELFFLAGS += $(platform-ldflags-y)
> ELFFLAGS += $(firmware-ldflags-y)
> --
> 2.41.0
>
>
> --
> opensbi mailing list
> opensbi at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/opensbi
More information about the opensbi
mailing list