From dd1596aa53ef18271d7e7faaed4dcd319b3ce37d Mon Sep 17 00:00:00 2001 From: Piotr Tworek Date: Mon, 18 Oct 2021 10:22:09 +0200 Subject: [PATCH] base: Don't produce .gnu.hash tables for Genode. Genode linker does not support .gnu.hash tables so they will never be used. Tell the linker not to bother producing them. This should reduce the size of Genode ELF files a tiny bit without loosing anything important in the process. Fixes #4423 --- repos/base/mk/global.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/repos/base/mk/global.mk b/repos/base/mk/global.mk index b614ab7282..75cfaff415 100644 --- a/repos/base/mk/global.mk +++ b/repos/base/mk/global.mk @@ -216,6 +216,12 @@ LD_OPT += $(LD_MARCH) $(LD_OPT_GC_SECTIONS) $(LD_OPT_ALIGN_SANE) CXX_LINK_OPT += $(addprefix $(LD_OPT_PREFIX),$(LD_OPT)) CXX_LINK_OPT += $(LD_OPT_NOSTDLIB) +# +# Genode linker does not support .gnu.hash so there is no point in having it +# in the ELF files. Tell the linker to only produce SysV hash tables. +# +LD_OPT += --hash-style=sysv + # # Linker script for dynamically linked programs #