public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] arm: Enable -ffunction-sections / -fdata-sections / --gc-sections
@ 2013-04-25 17:40 Tom Rini
  2013-05-23 10:08 ` Albert ARIBAUD
  2013-05-28  4:10 ` Albert ARIBAUD
  0 siblings, 2 replies; 4+ messages in thread
From: Tom Rini @ 2013-04-25 17:40 UTC (permalink / raw)
  To: u-boot

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 <albert.u.boot@aribaud.net>
Signed-off-by: Tom Rini <trini@ti.com>
---
 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
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] arm: Enable -ffunction-sections / -fdata-sections / --gc-sections
  2013-04-25 17:40 [U-Boot] [PATCH] arm: Enable -ffunction-sections / -fdata-sections / --gc-sections Tom Rini
@ 2013-05-23 10:08 ` Albert ARIBAUD
  2013-05-23 15:37   ` Tom Rini
  2013-05-28  4:10 ` Albert ARIBAUD
  1 sibling, 1 reply; 4+ messages in thread
From: Albert ARIBAUD @ 2013-05-23 10:08 UTC (permalink / raw)
  To: u-boot

Hi Tom,

On Thu, 25 Apr 2013 13:40:22 -0400, Tom Rini <trini@ti.com> 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.

I expect this was tested on various targets?

Amicalement,
-- 
Albert.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] arm: Enable -ffunction-sections / -fdata-sections / --gc-sections
  2013-05-23 10:08 ` Albert ARIBAUD
@ 2013-05-23 15:37   ` Tom Rini
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2013-05-23 15:37 UTC (permalink / raw)
  To: u-boot

On Thu, May 23, 2013 at 12:08:09PM +0200, Albert ARIBAUD wrote:
> Hi Tom,
> 
> On Thu, 25 Apr 2013 13:40:22 -0400, Tom Rini <trini@ti.com> 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.
> 
> I expect this was tested on various targets?

I build-tested eldk 4.2/5.2 and the Linaro 4.7 that Ubuntu has
available, with no build failures.  I spot checked what was being
dropped on am335x and some omap3/4 platforms and it looked correct, and
I did boot test am335x.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130523/787b2205/attachment.pgp>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] arm: Enable -ffunction-sections / -fdata-sections / --gc-sections
  2013-04-25 17:40 [U-Boot] [PATCH] arm: Enable -ffunction-sections / -fdata-sections / --gc-sections Tom Rini
  2013-05-23 10:08 ` Albert ARIBAUD
@ 2013-05-28  4:10 ` Albert ARIBAUD
  1 sibling, 0 replies; 4+ messages in thread
From: Albert ARIBAUD @ 2013-05-28  4:10 UTC (permalink / raw)
  To: u-boot

Hi Tom,

On Thu, 25 Apr 2013 13:40:22 -0400, Tom Rini <trini@ti.com> 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 <albert.u.boot@aribaud.net>
> Signed-off-by: Tom Rini <trini@ti.com>
> ---
>  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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-28  4:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-25 17:40 [U-Boot] [PATCH] arm: Enable -ffunction-sections / -fdata-sections / --gc-sections Tom Rini
2013-05-23 10:08 ` Albert ARIBAUD
2013-05-23 15:37   ` Tom Rini
2013-05-28  4:10 ` Albert ARIBAUD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox