From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Tue, 28 May 2013 06:10:06 +0200 Subject: [U-Boot] [PATCH] arm: Enable -ffunction-sections / -fdata-sections / --gc-sections In-Reply-To: <1366911622-6566-1-git-send-email-trini@ti.com> References: <1366911622-6566-1-git-send-email-trini@ti.com> Message-ID: <20130528061006.301f79bf@lilith> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Tom, On Thu, 25 Apr 2013 13:40:22 -0400, Tom Rini wrote: > While other architectures have enabled these gcc / ld options for some > time on U-Boot itself, ARM has only been doing this on SPL. Enable this > on full U-Boot as well now. > > Cc: Albert ARIBAUD > Signed-off-by: Tom Rini > --- > arch/arm/config.mk | 3 +++ > arch/arm/cpu/ixp/config.mk | 4 ---- > 2 files changed, 3 insertions(+), 4 deletions(-) > > diff --git a/arch/arm/config.mk b/arch/arm/config.mk > index 461899e..dc64160 100644 > --- a/arch/arm/config.mk > +++ b/arch/arm/config.mk > @@ -31,6 +31,9 @@ CONFIG_STANDALONE_LOAD_ADDR = 0xc100000 > endif > endif > > +LDFLAGS_FINAL += --gc-sections > +PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections > + > # Support generic board on ARM > __HAVE_ARCH_GENERIC_BOARD := y > > diff --git a/arch/arm/cpu/ixp/config.mk b/arch/arm/cpu/ixp/config.mk > index b02e8af..fd3c29f 100644 > --- a/arch/arm/cpu/ixp/config.mk > +++ b/arch/arm/cpu/ixp/config.mk > @@ -31,10 +31,6 @@ PLATFORM_CPPFLAGS += -mbig-endian -march=armv5te -mtune=strongarm1100 > PLATFORM_LDFLAGS += -EB > USE_PRIVATE_LIBGCC = yes > > -# -fdata-sections triggers "section .bss overlaps section .rel.dyn" linker error > -PLATFORM_RELFLAGS += -ffunction-sections > -LDFLAGS_u-boot += --gc-sections > - > # ========================================================================= > # > # Supply options according to compiler version Applied to u-boot-arm/master, thanks! Amicalement, -- Albert.