summaryrefslogtreecommitdiff
path: root/arch/powerpc/cpu/mpc86xx/config.mk
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/cpu/mpc86xx/config.mk')
-rw-r--r--arch/powerpc/cpu/mpc86xx/config.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/cpu/mpc86xx/config.mk b/arch/powerpc/cpu/mpc86xx/config.mk
index 7fae7e4286..bce0fb374b 100644
--- a/arch/powerpc/cpu/mpc86xx/config.mk
+++ b/arch/powerpc/cpu/mpc86xx/config.mk
@@ -26,5 +26,9 @@ PLATFORM_RELFLAGS += -fPIC -meabi
PLATFORM_CPPFLAGS += -ffixed-r2 -mstring
PLATFORM_CPPFLAGS += -maltivec -mabi=altivec -msoft-float
+# Enable gc-sections to enable generation of smaller images.
+PLATFORM_LDFLAGS += --gc-sections
+PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
+
# Use default linker script. Board port can override in board/*/config.mk
LDSCRIPT := $(SRCTREE)/arch/powerpc/cpu/mpc86xx/u-boot.lds