From patchwork Tue Dec 28 12:43:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Schwingen X-Patchwork-Id: 76832 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 8BD89B70D5 for ; Tue, 28 Dec 2010 23:51:25 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 61EAA280D5; Tue, 28 Dec 2010 13:51:07 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20ftJIcGFjLF; Tue, 28 Dec 2010 13:51:07 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F1E21280D8; Tue, 28 Dec 2010 13:50:42 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E0251280C1 for ; Tue, 28 Dec 2010 13:50:24 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id He-RmO68+pgZ for ; Tue, 28 Dec 2010 13:50:24 +0100 (CET) X-Greylist: delayed 315 seconds by postgrey-1.27 at theia; Tue, 28 Dec 2010 13:50:20 CET X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail.dascon.de (pve-mail.dascon.de [93.159.248.171]) by theia.denx.de (Postfix) with ESMTP id 0BB97280C0 for ; Tue, 28 Dec 2010 13:50:20 +0100 (CET) Received: by mail.dascon.de (Postfix, from userid 10) id 4B584223F; Tue, 28 Dec 2010 13:45:05 +0100 (CET) Received: from discworld.ms.intern (discworld.dascon.de [192.168.11.1]) by a-tuin.dascon.de (Postfix) with ESMTP id 5C77280905; Tue, 28 Dec 2010 13:43:43 +0100 (CET) From: Michael Schwingen To: u-boot@lists.denx.de Date: Tue, 28 Dec 2010 13:43:30 +0100 Message-Id: <1293540211-3684-13-git-send-email-michael@schwingen.org> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1293540211-3684-1-git-send-email-michael@schwingen.org> References: <1293540211-3684-1-git-send-email-michael@schwingen.org> Cc: Michael Schwingen Subject: [U-Boot] [PATCH 12/13] add support for function-sections X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Signed-off-by: Michael Schwingen --- config.mk | 6 ++++++ include/configs/actux1.h | 1 + include/configs/actux2.h | 1 + include/configs/actux3.h | 1 + include/configs/actux4.h | 1 + 5 files changed, 10 insertions(+), 0 deletions(-) diff --git a/config.mk b/config.mk index 66f8fe6..f7c7760 100644 --- a/config.mk +++ b/config.mk @@ -152,6 +152,9 @@ endif RELFLAGS= $(PLATFORM_RELFLAGS) DBGFLAGS= -g # -DDEBUG OPTFLAGS= -Os #-fomit-frame-pointer +ifeq ($(CONFIG_USE_FUNCTION_SECTIONS),y) +OPTFLAGS += -ffunction-sections +endif ifndef LDSCRIPT #LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug ifeq ($(CONFIG_NAND_U_BOOT),y) @@ -205,6 +208,9 @@ endif AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS) LDFLAGS += -Bstatic -T $(obj)u-boot.lds $(PLATFORM_LDFLAGS) +ifeq ($(CONFIG_USE_FUNCTION_SECTIONS),y) +LDFLAGS += --gc-sections +endif ifneq ($(CONFIG_SYS_TEXT_BASE),) LDFLAGS += -Ttext $(CONFIG_SYS_TEXT_BASE) endif diff --git a/include/configs/actux1.h b/include/configs/actux1.h index 2ffedf1..e4f7358 100644 --- a/include/configs/actux1.h +++ b/include/configs/actux1.h @@ -28,6 +28,7 @@ #define CONFIG_IXP425 1 #define CONFIG_ACTUX1 1 +#define CONFIG_USE_FUNCTION_SECTIONS 1 #define CONFIG_DISPLAY_CPUINFO 1 #define CONFIG_DISPLAY_BOARDINFO 1 diff --git a/include/configs/actux2.h b/include/configs/actux2.h index 4ba3ce0..bef5bc0 100644 --- a/include/configs/actux2.h +++ b/include/configs/actux2.h @@ -28,6 +28,7 @@ #define CONFIG_IXP425 1 #define CONFIG_ACTUX2 1 +#define CONFIG_USE_FUNCTION_SECTIONS 1 #define CONFIG_DISPLAY_CPUINFO 1 #define CONFIG_DISPLAY_BOARDINFO 1 diff --git a/include/configs/actux3.h b/include/configs/actux3.h index 4b9b496..33d2db1 100644 --- a/include/configs/actux3.h +++ b/include/configs/actux3.h @@ -28,6 +28,7 @@ #define CONFIG_IXP425 1 #define CONFIG_ACTUX3 1 +#define CONFIG_USE_FUNCTION_SECTIONS 1 #define CONFIG_DISPLAY_CPUINFO 1 #define CONFIG_DISPLAY_BOARDINFO 1 diff --git a/include/configs/actux4.h b/include/configs/actux4.h index ac7d1ba..ed68302 100644 --- a/include/configs/actux4.h +++ b/include/configs/actux4.h @@ -28,6 +28,7 @@ #define CONFIG_IXP425 1 #define CONFIG_ACTUX4 1 +#define CONFIG_USE_FUNCTION_SECTIONS 1 #define CONFIG_DISPLAY_CPUINFO 1 #define CONFIG_DISPLAY_BOARDINFO 1