aboutsummaryrefslogtreecommitdiffstats
path: root/include/kernel-build.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-01-26 16:26:13 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-01-26 16:26:13 +0000
commit081d10c7392038050d3db11a7d628c371750b20c (patch)
tree24d7f96936770d3e3ee904982008bfcf174acc7e /include/kernel-build.mk
parentbaf6422f7bf114647183d0458b73a73697b45ed2 (diff)
downloadmaster-187ad058-081d10c7392038050d3db11a7d628c371750b20c.tar.gz
master-187ad058-081d10c7392038050d3db11a7d628c371750b20c.tar.bz2
master-187ad058-081d10c7392038050d3db11a7d628c371750b20c.zip
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 'include/kernel-build.mk')
-rw-r--r--include/kernel-build.mk12
1 files changed, 2 insertions, 10 deletions
diff --git a/include/kernel-build.mk b/include/kernel-build.mk
index 0b7b54fdd8..095940c570 100644
--- a/include/kernel-build.mk
+++ b/include/kernel-build.mk
@@ -81,15 +81,11 @@ define BuildKernel
( \
echo '#define SYMTAB_KEEP \'; \
cat $(KERNEL_BUILD_DIR)/sym_include.txt | \
- awk '{print "*(___ksymtab+" $$$$1 ") \\" }'; \
+ awk '{print "KEEP(*(___ksymtab+" $$$$1 ")) \\" }'; \
echo; \
echo '#define SYMTAB_KEEP_GPL \'; \
cat $(KERNEL_BUILD_DIR)/sym_include.txt | \
- awk '{print "*(___ksymtab_gpl+" $$$$1 ") \\" }'; \
- echo; \
- echo '#define SYMTAB_KEEP_STR \'; \
- cat $(KERNEL_BUILD_DIR)/sym_include.txt | \
- awk '{print "*(__ksymtab_strings." $$$$1 ") \\" }'; \
+ awk '{print "KEEP(*(___ksymtab_gpl+" $$$$1 ")) \\" }'; \
echo; \
echo '#define SYMTAB_DISCARD \'; \
cat $(KERNEL_BUILD_DIR)/sym_exclude.txt | \
@@ -99,10 +95,6 @@ define BuildKernel
cat $(KERNEL_BUILD_DIR)/sym_exclude.txt | \
awk '{print "*(___ksymtab_gpl+" $$$$1 ") \\" }'; \
echo; \
- echo '#define SYMTAB_DISCARD_STR \'; \
- cat $(KERNEL_BUILD_DIR)/sym_exclude.txt | \
- awk '{print "*(__ksymtab_strings." $$$$1 ") \\" }'; \
- echo; \
) > $$@
$(STAMP_CONFIGURED): $(STAMP_PREPARED) $(LINUX_KCONFIG_LIST) $(TOPDIR)/.config