From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Sven Eckelmann Date: Tue, 7 May 2013 14:51:08 +0200 Message-Id: <1367931069-7177-9-git-send-email-sven@narfation.org> In-Reply-To: <1367931069-7177-1-git-send-email-sven@narfation.org> References: <1367931069-7177-1-git-send-email-sven@narfation.org> Subject: [B.A.T.M.A.N.] [PATCH 8/9] batman-adv-devel: Use section garbage collection to reduce binary size Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: b.a.t.m.a.n@lists.open-mesh.org Cc: Sven Eckelmann The linker can identify unused sections of a binary when each symbol is stored in a separate section. This mostly removes unused linker sections and reduces the size by ~3% on mipsel. Signed-off-by: Sven Eckelmann --- batman-adv-devel/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/batman-adv-devel/Makefile b/batman-adv-devel/Makefile index b9e2650..6dc66b8 100644 --- a/batman-adv-devel/Makefile +++ b/batman-adv-devel/Makefile @@ -76,6 +76,9 @@ MAKE_BATCTL_ARGS += \ STRIP="/bin/true" \ batctl install +TARGET_CFLAGS += -ffunction-sections -fdata-sections +TARGET_LDFLAGS += -Wl,--gc-sections + ifneq ($(DEVELOPER)$(CONFIG_KMOD_BATMAN_ADV_DEVEL_BATCTL),) define Download/batctl FILE:=$(PKG_BATCTL_FNAME) -- 1.8.2.1