diff options
author | Alexey Brodkin <abrodkin@synopsys.com> | 2018-01-25 00:25:12 +0300 |
---|---|---|
committer | Alexey Brodkin <abrodkin@synopsys.com> | 2018-03-21 16:21:34 +0300 |
commit | fac4790491f69b29755d92db2cad508849573ff7 (patch) | |
tree | 9f1705cf5371ee9bb240f5352c63337fb3ae734f /arch/arc/config.mk | |
parent | 0a097ba54bee9ee9fb2f6c5529b55d4b46b872b2 (diff) | |
download | u-boot-fac4790491f69b29755d92db2cad508849573ff7.tar.gz |
arc: Eliminate unused code and data with GCC's garbage collector
Finally GCC's garbage collector works on ARC so let's use it.
That's what I may see for HSDK:
Before:
text data bss dec hex filename
290153 10068 222616 522837 7fa55 u-boot
After:
text data bss dec hex filename
261999 9460 222360 493819 788fb u-boot
Overall ~5% of memory footprint saved.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Diffstat (limited to 'arch/arc/config.mk')
-rw-r--r-- | arch/arc/config.mk | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arc/config.mk b/arch/arc/config.mk index 3ed0c282ba..d040454d1a 100644 --- a/arch/arc/config.mk +++ b/arch/arc/config.mk @@ -51,9 +51,10 @@ PLATFORM_CPPFLAGS += -mcpu=archs endif PLATFORM_CPPFLAGS += -ffixed-r25 -D__ARC__ -gdwarf-2 -mno-sdata +PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections # Needed for relocation -LDFLAGS_FINAL += -pie +LDFLAGS_FINAL += -pie --gc-sections # Load address for standalone apps CONFIG_STANDALONE_LOAD_ADDR ?= 0x82000000 |