aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2018-04-23 07:59:44 +0200
committerAndes <uboot@andestech.com>2018-05-29 14:43:12 +0800
commit6cc1a2af46c448e7d822fa4976a8d6e10fc5273b (patch)
tree25e3a65ca495f35dbb550a13eab4c98b0b7590bc /arch
parenta7f99e5dd7dfa1853dee25e0fcb761eee0fb3ad3 (diff)
downloadu-boot-6cc1a2af46c448e7d822fa4976a8d6e10fc5273b.zip
u-boot-6cc1a2af46c448e7d822fa4976a8d6e10fc5273b.tar.gz
u-boot-6cc1a2af46c448e7d822fa4976a8d6e10fc5273b.tar.bz2
riscv: Enable function sections
The linker can remove sections that are never addressed, so it makes a lot of sense to declare every function as an individual section. This reduces the output U-Boot code size by ~30kb for me. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/riscv/config.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/config.mk b/arch/riscv/config.mk
index a7448e2..f65ed87 100644
--- a/arch/riscv/config.mk
+++ b/arch/riscv/config.mk
@@ -29,5 +29,5 @@ CONFIG_STANDALONE_LOAD_ADDR = 0x00000000 \
-T $(srctree)/examples/standalone/riscv.lds
PLATFORM_CPPFLAGS += -ffixed-gp -fpic
-PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -gdwarf-2
+PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -gdwarf-2 -ffunction-sections
LDFLAGS_u-boot += --gc-sections -static -pie