[OpenWrt-Devel] [PATCH v2] kernel: revert evil EVIL module stripping patches

Daniel Santos daniel.santos at pobox.com
Sat Oct 27 18:29:56 EDT 2018


Don't ever EVER do this!  It has taken me several hours to discover the
underlying cause of my modules being mysteriously stripped, despite
having made certain CONFIG_MODULE_STRIP was not enabled.  This is a
truely horrendous and dispicable way to strip modules.  First of all, it
is insideious and activates any time you aren't profiling.  Second, it
also brakes kmemleak.

Never go behind the back of the programmer / admin / hacker and do
things like this without their permission.  In Free and Open Source
Software, we do not force things to happen that the user has not elected
to have done.  If you really want excessive stripping for that extra 4k,
then add a distinct option to remove all symbols.

Signed-off-by: Daniel Santos <daniel.santos at pobox.com>
---
 .../generic/hack-4.14/202-reduce_module_size.patch | 24 ----------------------
 .../generic/hack-4.9/202-reduce_module_size.patch  | 24 ----------------------
 2 files changed, 48 deletions(-)
 delete mode 100644 target/linux/generic/hack-4.14/202-reduce_module_size.patch
 delete mode 100644 target/linux/generic/hack-4.9/202-reduce_module_size.patch

diff --git a/target/linux/generic/hack-4.14/202-reduce_module_size.patch b/target/linux/generic/hack-4.14/202-reduce_module_size.patch
deleted file mode 100644
index 2cbb6add9a..0000000000
--- a/target/linux/generic/hack-4.14/202-reduce_module_size.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From fd66884da2f96d2a7ea73f58b1b86251b959a913 Mon Sep 17 00:00:00 2001
-From: Felix Fietkau <nbd at nbd.name>
-Date: Fri, 7 Jul 2017 16:56:19 +0200
-Subject: kernel: strip unnecessary symbol table information from kernel modules
-
-reduces default squashfs size on ar71xx by about 4k
-
-lede-commit: 058d331a39077f159ca8922f1f422a1346d6aa67
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/Makefile
-+++ b/Makefile
-@@ -425,7 +425,7 @@ KBUILD_AFLAGS_KERNEL :=
- KBUILD_CFLAGS_KERNEL :=
- KBUILD_AFLAGS_MODULE  := -DMODULE
- KBUILD_CFLAGS_MODULE  := -DMODULE
--KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
-+KBUILD_LDFLAGS_MODULE = -T $(srctree)/scripts/module-common.lds $(if $(CONFIG_PROFILING),,-s)
- GCC_PLUGINS_CFLAGS :=
- 
- export ARCH SRCARCH SUBARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD
diff --git a/target/linux/generic/hack-4.9/202-reduce_module_size.patch b/target/linux/generic/hack-4.9/202-reduce_module_size.patch
deleted file mode 100644
index f744b945fe..0000000000
--- a/target/linux/generic/hack-4.9/202-reduce_module_size.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From fd66884da2f96d2a7ea73f58b1b86251b959a913 Mon Sep 17 00:00:00 2001
-From: Felix Fietkau <nbd at nbd.name>
-Date: Fri, 7 Jul 2017 16:56:19 +0200
-Subject: kernel: strip unnecessary symbol table information from kernel modules
-
-reduces default squashfs size on ar71xx by about 4k
-
-lede-commit: 058d331a39077f159ca8922f1f422a1346d6aa67
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/Makefile
-+++ b/Makefile
-@@ -403,7 +403,7 @@ KBUILD_AFLAGS_KERNEL :=
- KBUILD_CFLAGS_KERNEL :=
- KBUILD_AFLAGS_MODULE  := -DMODULE
- KBUILD_CFLAGS_MODULE  := -DMODULE
--KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
-+KBUILD_LDFLAGS_MODULE = -T $(srctree)/scripts/module-common.lds $(if $(CONFIG_PROFILING),,-s)
- GCC_PLUGINS_CFLAGS :=
- 
- # Read KERNELRELEASE from include/config/kernel.release (if it exists)
-- 
2.16.4


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list