aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/vmlinux.lds.S
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@mips.com>2018-11-21 21:56:36 +0000
committerPaul Burton <paul.burton@mips.com>2018-11-21 15:36:49 -0800
commitc0436b503591f927f326457a588c461881260276 (patch)
tree805fdef33156e14df943d5bfad3aa0deb2b43cd5 /arch/mips/kernel/vmlinux.lds.S
parentMIPS: OCTEON: cvmx-ciu2-defs.h: delete unused unions (diff)
downloadlinux-dev-c0436b503591f927f326457a588c461881260276.tar.xz
linux-dev-c0436b503591f927f326457a588c461881260276.zip
MIPS: Enable dead code elimination
Select CONFIG_HAVE_LD_DEAD_CODE_DATA_ELIMINATION for MIPS, allowing the user to enable dead code elimination. In order for this to work, ensure that we keep the data bus exception table & the machine list by annotating them with KEEP. This shrinks both 32r2el_defconfig & 64r6el_defconfig builds by ~6%, as shown by numbers from scripts/bloat-o-meter: | 32r2el_defconfig | 64r6el_defconfig --------|------------------|------------------ No DCE | 8919864 | 8286307 DCE | 8338988 (-6.51%) | 7741808 (-6.57%) Signed-off-by: Paul Burton <paul.burton@mips.com> Patchwork: https://patchwork.linux-mips.org/patch/21187/ Cc: linux-mips@linux-mips.org
Diffstat (limited to 'arch/mips/kernel/vmlinux.lds.S')
-rw-r--r--arch/mips/kernel/vmlinux.lds.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index 971a504001c2..cb7e9ed7a453 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -72,7 +72,7 @@ SECTIONS
/* Exception table for data bus errors */
__dbe_table : {
__start___dbe_table = .;
- *(__dbe_table)
+ KEEP(*(__dbe_table))
__stop___dbe_table = .;
}
@@ -123,7 +123,7 @@ SECTIONS
. = ALIGN(4);
.mips.machines.init : AT(ADDR(.mips.machines.init) - LOAD_OFFSET) {
__mips_machines_start = .;
- *(.mips.machines.init)
+ KEEP(*(.mips.machines.init))
__mips_machines_end = .;
}