From: Charles Manning Date: Thu, 3 May 2012 13:37:51 +1200 Subject: [U-Boot] [PATCH] Add gc-section support for ARM Message-ID: <1336009071-23704-1-git-send-email-cdhmanning@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Seems odd that this hasn't been done yet. Shaves 5k off an omap overo build. Signed-off-by: Charles Manning --- arch/arm/config.mk | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/arm/config.mk b/arch/arm/config.mk index 45f9dca..73e0cce 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -55,6 +55,10 @@ PF_CPPFLAGS_ABI := $(call cc-option,\ ) PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_ARM) $(PF_CPPFLAGS_ABI) +PLATFORM_RELFLAGS += -ffunction-sections + +LDFLAGS_FINAL += --gc-sections + # For EABI, make sure to provide raise() ifneq (,$(findstring -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS))) # This file is parsed many times, so the string may get added multiple -- 1.7.1