summaryrefslogtreecommitdiffstats
path: root/skiboot.lds.S
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2017-01-05 19:35:48 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-02-06 18:57:43 +1100
commit2bec353d38a685a4352f48fbbf0d765359da3bdb (patch)
tree5077bc246e46be3d843a4ab67ece4830ec6cf31b /skiboot.lds.S
parent4ebde139333659b6de4516830a2785b8a89c08a4 (diff)
downloadblackbird-skiboot-2bec353d38a685a4352f48fbbf0d765359da3bdb.tar.gz
blackbird-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 'skiboot.lds.S')
-rw-r--r--skiboot.lds.S5
1 files changed, 2 insertions, 3 deletions
diff --git a/skiboot.lds.S b/skiboot.lds.S
index 7d3d0cf3..4a5dabe3 100644
--- a/skiboot.lds.S
+++ b/skiboot.lds.S
@@ -85,8 +85,8 @@ SECTIONS
. = ALIGN(0x10);
.init : {
__ctors_start = .;
- *(.ctors)
- *(.init_array)
+ KEEP(*(.ctors))
+ KEEP(*(.init_array))
__ctors_end = .;
}
@@ -143,7 +143,6 @@ SECTIONS
__sym_map_start = . ;
KEEP(*(.sym_map))
__sym_map_end = . ;
- KEEP(*(.sym_map))
}
/* We locate the BSS at 2M to leave room for the symbol map */
OpenPOWER on IntegriCloud