diff options
author | Lukas Auer <lukas.auer@aisec.fraunhofer.de> | 2018-11-22 11:26:16 +0100 |
---|---|---|
committer | Andes <uboot@andestech.com> | 2018-11-26 13:57:29 +0800 |
commit | 776e6335bf425f6b3cad01a25935dd2b7d4f40b7 (patch) | |
tree | 044062bff4c1aef73e78861156024afd272a5e49 /arch/riscv/config.mk | |
parent | 0c074845e57e581dab9b024f4a517d4df8d73e9f (diff) | |
download | u-boot-776e6335bf425f6b3cad01a25935dd2b7d4f40b7.zip u-boot-776e6335bf425f6b3cad01a25935dd2b7d4f40b7.tar.gz u-boot-776e6335bf425f6b3cad01a25935dd2b7d4f40b7.tar.bz2 |
riscv: enable -fdata-sections
Enable the -fdata-sections compiler option for RISC-V. Buildman reports
the binary size decrease from this as 8365.3 bytes.
Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Diffstat (limited to 'arch/riscv/config.mk')
-rw-r--r-- | arch/riscv/config.mk | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/riscv/config.mk b/arch/riscv/config.mk index 97e2d41..ff4fe64 100644 --- a/arch/riscv/config.mk +++ b/arch/riscv/config.mk @@ -27,7 +27,8 @@ CONFIG_STANDALONE_LOAD_ADDR = 0x00000000 LDFLAGS_STANDALONE += -T $(srctree)/examples/standalone/riscv.lds PLATFORM_CPPFLAGS += -ffixed-gp -fpic -PLATFORM_RELFLAGS += -fno-common -gdwarf-2 -ffunction-sections +PLATFORM_RELFLAGS += -fno-common -gdwarf-2 -ffunction-sections \ + -fdata-sections LDFLAGS_u-boot += --gc-sections -static -pie EFI_CRT0 := crt0_riscv_efi.o |