summaryrefslogtreecommitdiff
path: root/arch/nios2
diff options
context:
space:
mode:
Diffstat (limited to 'arch/nios2')
-rw-r--r--arch/nios2/config.mk3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/nios2/config.mk b/arch/nios2/config.mk
index 793cc43..aba96b3 100644
--- a/arch/nios2/config.mk
+++ b/arch/nios2/config.mk
@@ -30,3 +30,6 @@ PLATFORM_CPPFLAGS += -DCONFIG_NIOS2 -D__NIOS2__
PLATFORM_CPPFLAGS += -G0
LDSCRIPT ?= $(SRCTREE)/$(CPUDIR)/u-boot.lds
+
+LDFLAGS += --gc-sections
+PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections