arm: Enable -ffunction-sections / -fdata-sections / --gc-sections
PATCH 1/1 arm: Enable -ffunction-sections / -fdata-sections / --gc-sections
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.
--- arch/arm/config.mk | 3 +++ arch/arm/cpu/ixp/config.mk | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-)
arch/arm/config.mk +3 -0
@@ -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
arch/arm/cpu/ixp/config.mk +0 -4
@@ -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
Signature · 1 line
1.7.9.5
PATCH 1/1 arm: Enable -ffunction-sections / -fdata-sections / --gc-sections
Hi Tom,
Quoted 3 lines · Tom Rini
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,
Signature · 1 line
Albert.
PATCH 1/1 arm: Enable -ffunction-sections / -fdata-sections / --gc-sections
Quoted 9 lines · Albert ARIBAUD
Hi Tom,
Quoted 3 lines · Tom Rini
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.
Signature · 8 lines
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>
PATCH 1/1 arm: Enable -ffunction-sections / -fdata-sections / --gc-sections
In reply to Tom RiniHi Tom,
Quoted 30 lines · Tom Rini
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 <[email protected]>Signed-off-by Tom Rini <[email protected]>--- arch/arm/config.mk | 3 +++ arch/arm/cpu/ixp/config.mk | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-)arch/arm/config.mk +3
-0@@ -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 := yarch/arm/cpu/ixp/config.mk +0
-0
arch/arm/cpu/ixp/config.mk PLATFORM_CPPFLAGS += -mbig-endian -march=armv5te -mtune=strongarm1100 · line 36
Quoted 10 lines
arch/arm/cpu/ixp/config.mk +0
-4@@ -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,
Signature · 1 line
Albert.