diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2017-01-05 19:35:48 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-02-06 18:57:43 +1100 |
commit | 2bec353d38a685a4352f48fbbf0d765359da3bdb (patch) | |
tree | 5077bc246e46be3d843a4ab67ece4830ec6cf31b /Makefile | |
parent | 4ebde139333659b6de4516830a2785b8a89c08a4 (diff) | |
download | talos-skiboot-2bec353d38a685a4352f48fbbf0d765359da3bdb.tar.gz talos-skiboot-2bec353d38a685a4352f48fbbf0d765359da3bdb.zip |
Dead code and data elimination
Add an experimental option to do basic dead code and data elimintation
with -ffunction-sections/-fdata-sections/--gc-sections.
This saves about 80kB of text/data.
Also remove the use of of -ffunction-sections by default. This predates
git history, but I don't think there is a good reason to use it without
--gc-sections. The GCC manual says:
Only use these options when there are significant benefits from
doing so. When you specify these options, the assembler and linker
create larger object and executable files and are also slower. You
cannot use gprof on all systems if you specify this option, and you
may have problems with debugging if you specify both this option
and -g.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -44,6 +44,8 @@ STACK_CHECK ?= $(DEBUG) LITTLE_ENDIAN ?= 0 # ELF v2 ABI is more efficient and compact ELF_ABI_v2 ?= $(LITTLE_ENDIAN) +# Discard unreferenced code and data at link-time +DEAD_CODE_ELIMINATION ?= 0 # # Where is the source directory, must be a full path (no ~) |