summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-08-28 07:38:36 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-08-28 07:38:36 +0000
commit999ec62da77a140e02de353abdff7b66cb19c271 (patch)
tree6f68fb1549d24fd1ea5efa518c996a3cda721a76 /target
parentae660e85d3b34e8f9344aafdf20c141adcd1677c (diff)
downloadmtk-20170518-999ec62da77a140e02de353abdff7b66cb19c271.zip
mtk-20170518-999ec62da77a140e02de353abdff7b66cb19c271.tar.gz
mtk-20170518-999ec62da77a140e02de353abdff7b66cb19c271.tar.bz2
kernel: fix booting issues on imx23 and imx6 targets
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 37854
Diffstat (limited to 'target')
-rw-r--r--target/linux/generic/patches-3.10/220-gc_sections.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/target/linux/generic/patches-3.10/220-gc_sections.patch b/target/linux/generic/patches-3.10/220-gc_sections.patch
index 54caa85..cc40d8e 100644
--- a/target/linux/generic/patches-3.10/220-gc_sections.patch
+++ b/target/linux/generic/patches-3.10/220-gc_sections.patch
@@ -1,3 +1,15 @@
+From: Felix Fietkau <nbd@openwrt.org>
+
+use -ffunction-sections, -fdata-sections and --gc-sections
+
+In combination with kernel symbol export stripping this significantly reduces
+the kernel image size. Used on both ARM and MIPS architectures.
+
+Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+Signed-off-by: Jonas Gorski <jogo@openwrt.org>
+Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
+---
+
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -89,10 +89,14 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlin
@@ -475,6 +487,23 @@
__stop_unwind_tab = .;
}
#endif
+@@ -158,14 +158,14 @@ SECTIONS
+ */
+ __vectors_start = .;
+ .vectors 0 : AT(__vectors_start) {
+- *(.vectors)
++ KEEP(*(.vectors))
+ }
+ . = __vectors_start + SIZEOF(.vectors);
+ __vectors_end = .;
+
+ __stubs_start = .;
+ .stubs 0x1000 : AT(__stubs_start) {
+- *(.stubs)
++ KEEP(*(.stubs))
+ }
+ . = __stubs_start + SIZEOF(.stubs);
+ __stubs_end = .;
@@ -179,24 +179,24 @@ SECTIONS
}
.init.arch.info : {