From 6ed125a6027eea0f22b92d96d6fb538446fa94c0 Mon Sep 17 00:00:00 2001 From: Vivian Wang Date: Mon, 18 Sep 2023 01:52:51 +0800 Subject: [PATCH] Makefile: Add --exclude-libs ALL to avoid .dynsym 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 Reviewed-by: Anup Patel --- 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)