public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Michael Schwingen <michael@schwingen.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 12/13] add support for function-sections
Date: Tue, 28 Dec 2010 13:43:30 +0100	[thread overview]
Message-ID: <1293540211-3684-13-git-send-email-michael@schwingen.org> (raw)
In-Reply-To: <1293540211-3684-1-git-send-email-michael@schwingen.org>


Signed-off-by: Michael Schwingen <michael@schwingen.org>
---
 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
-- 
1.7.2.3

  parent reply	other threads:[~2010-12-28 12:43 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-28 12:43 [U-Boot] IXP42x patch series Michael Schwingen
2010-12-28 12:43 ` [U-Boot] [PATCH 01/13] add XScale sub architecture (IXP/PXA) to board list Michael Schwingen
2010-12-28 12:43 ` [U-Boot] [PATCH 02/13] add support for IXP42x Rev. B1 and newer Michael Schwingen
2010-12-28 12:43 ` [U-Boot] [PATCH 03/13] trigger hardware watchdog in IXP42x serial driver Michael Schwingen
2010-12-28 12:43 ` [U-Boot] [PATCH 04/13] Fix IXP code to work after relocation was added: - jump to real flash location after reset before turning off flash mirror - fix timer system to use HZ == 1000, remove broken interrupt-based code Michael Schwingen
2010-12-29  4:48   ` Mike Frysinger
2010-12-28 12:43 ` [U-Boot] [PATCH 05/13] fix "depend" target in npe directory Michael Schwingen
2010-12-28 12:43 ` [U-Boot] [PATCH 06/13] update/fix AcTux1 board Michael Schwingen
2010-12-28 12:43 ` [U-Boot] [PATCH 07/13] update/fix AcTux2 board Michael Schwingen
2010-12-28 12:43 ` [U-Boot] [PATCH 08/13] update/fix AcTux3 board Michael Schwingen
2010-12-28 12:43 ` [U-Boot] [PATCH 09/13] update/fix AcTux4 board Michael Schwingen
2010-12-28 12:43 ` [U-Boot] [PATCH 10/13] update/fix some more IXP42x boards (only compile tested) Michael Schwingen
2010-12-28 12:43 ` [U-Boot] [PATCH 11/13] add dvlhost (dLAN 200 AV Wireless G) board Michael Schwingen
2010-12-28 12:43 ` Michael Schwingen [this message]
2010-12-29  4:47   ` [U-Boot] [PATCH 12/13] add support for function-sections Mike Frysinger
2010-12-29  8:28     ` Michael Schwingen
2010-12-29  8:35       ` Mike Frysinger
2010-12-28 12:43 ` [U-Boot] [PATCH 13/13] add support for fixed-speed MII ports (no standard PHY registers) Michael Schwingen
2010-12-29  4:48   ` Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1293540211-3684-13-git-send-email-michael@schwingen.org \
    --to=michael@schwingen.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox