aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorVivian Wang <dramforever@live.com>2023-09-18 01:52:51 +0800
committerAnup Patel <anup@brainfault.org>2023-10-06 09:21:24 +0530
commit6ed125a6027eea0f22b92d96d6fb538446fa94c0 (patch)
tree619ab28f4999e42a00f8905e317b962ba9fa9d9a /Makefile
parent2a6d72534d44c39e1de0614970a0dad97b1c41ba (diff)
downloadopensbi-6ed125a6027eea0f22b92d96d6fb538446fa94c0.zip
opensbi-6ed125a6027eea0f22b92d96d6fb538446fa94c0.tar.gz
opensbi-6ed125a6027eea0f22b92d96d6fb538446fa94c0.tar.bz2
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 <dramforever@live.com> Reviewed-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile1
1 files changed, 1 insertions, 0 deletions
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)