diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-01-26 16:26:13 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-01-26 16:26:13 +0000 |
commit | 8933b918cd6bce2db5a6a5a51513b62672f13069 (patch) | |
tree | 6bd79c5e27a84096f2b209d0e108c9a89f88581d /target/linux/generic/patches-3.8/305-mips_module_reloc.patch | |
parent | 7809d73fd2b78c65aad0a1e18b06c3a4c0c15a8d (diff) | |
download | mtk-20170518-8933b918cd6bce2db5a6a5a51513b62672f13069.zip mtk-20170518-8933b918cd6bce2db5a6a5a51513b62672f13069.tar.gz mtk-20170518-8933b918cd6bce2db5a6a5a51513b62672f13069.tar.bz2 |
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
SVN-Revision: 35320
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.patch | 4 |
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 3c51d14..f0f5137 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 |