summaryrefslogtreecommitdiffstats
path: root/target/linux/generic/patches-3.8/305-mips_module_reloc.patch
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-01-26 16:26:13 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-01-26 16:26:13 +0000
commitedf06589cc0ad9474b6c17aa84af90a932eaca13 (patch)
tree24d7f96936770d3e3ee904982008bfcf174acc7e /target/linux/generic/patches-3.8/305-mips_module_reloc.patch
parent0a3970a70de5376f9a7ddef0c0b68acf9eb8caab (diff)
kernel: use -ffunction-sections, -fdata-sections and --gc-sections on mips
in combination with kernel symbol export stripping this significantly reduces the kernel image size git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35320 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/patches-3.8/305-mips_module_reloc.patch')
-rw-r--r--target/linux/generic/patches-3.8/305-mips_module_reloc.patch4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/generic/patches-3.8/305-mips_module_reloc.patch b/target/linux/generic/patches-3.8/305-mips_module_reloc.patch
index 3c51d14cf..f0f513741 100644
--- a/target/linux/generic/patches-3.8/305-mips_module_reloc.patch
+++ b/target/linux/generic/patches-3.8/305-mips_module_reloc.patch
@@ -3,7 +3,7 @@
@@ -90,8 +90,13 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlin
cflags-y += -G 0 -mno-abicalls -fno-pic -pipe -mno-branch-likely
cflags-y += -msoft-float
- LDFLAGS_vmlinux += -G 0 -static -n -nostdlib
+ LDFLAGS_vmlinux += -G 0 -static -n -nostdlib --gc-sections
+ifdef CONFIG_64BIT
KBUILD_AFLAGS_MODULE += -mlong-calls
KBUILD_CFLAGS_MODULE += -mlong-calls
@@ -12,7 +12,7 @@
+KBUILD_CFLAGS_MODULE += -mno-long-calls
+endif
- cflags-y += -ffreestanding
+ KBUILD_CFLAGS_KERNEL += -ffunction-sections -fdata-sections
--- a/arch/mips/include/asm/module.h
+++ b/arch/mips/include/asm/module.h