diff options
author | Yousong Zhou <yszhou4tech@gmail.com> | 2017-01-11 19:57:24 +0800 |
---|---|---|
committer | Yousong Zhou <yszhou4tech@gmail.com> | 2017-04-27 14:46:31 +0800 |
commit | 3bfe7ee6326d5131e50678638251540c8acf2177 (patch) | |
tree | 7c6c2d8491facc2ee490b6885588b9dc881572f7 /target/linux | |
parent | 2bc8d5eaf17823ddd319f5fd3e9fb880535ed696 (diff) | |
download | mtk-20170518-3bfe7ee6326d5131e50678638251540c8acf2177.zip mtk-20170518-3bfe7ee6326d5131e50678638251540c8acf2177.tar.gz mtk-20170518-3bfe7ee6326d5131e50678638251540c8acf2177.tar.bz2 |
generic: keep module aliases inside .modinfo
It seems module aliases are actually essential info. E.g. other modules
may call xt_request_find_match(NFPROTO_IPV{4,6}, "hashlimit", 1) and the
kernel will request user mode modprobe helper for ipt_hashlimit and
ip6t_hashlimit respectively which are aliases of xt_hashlimit.ko
Compile-tested for armvirt, there is nearly no size impact.
Before
-rw-r--r-- 1 yousong yousong 304 Jan 10 17:37 config.seed
-rw-r--r-- 1 yousong yousong 1634 Jan 11 11:07 lede-armvirt-default.manifest
-rw-r--r-- 1 yousong yousong 1533647 Jan 11 11:07 lede-armvirt-default-rootfs.tar.gz
-rw-r--r-- 1 yousong yousong 1802711 Jan 11 11:07 lede-armvirt-root.ext4.gz
-rw-r--r-- 1 yousong yousong 1544597 Jan 11 11:07 lede-armvirt-rootfs.cpio.gz
-rw-r--r-- 1 yousong yousong 1174984 Jan 11 11:07 lede-armvirt-root.squashfs.gz
-rwxr-xr-x 1 yousong yousong 1654712 Jan 11 11:07 lede-armvirt-zImage
-rwxr-xr-x 1 yousong yousong 2738296 Jan 11 11:07 lede-armvirt-zImage-initramfs
drwxr-xr-x 2 yousong yousong 4096 Jan 10 17:35 packages
-rw-r--r-- 1 yousong yousong 739 Jan 10 17:37 sha256sums
After
-rw-r--r-- 1 yousong yousong 304 Jan 10 17:37 config.seed
-rw-r--r-- 1 yousong yousong 1634 Jan 11 11:10 lede-armvirt-default.manifest
-rw-r--r-- 1 yousong yousong 1533646 Jan 11 11:10 lede-armvirt-default-rootfs.tar.gz
-rw-r--r-- 1 yousong yousong 1802711 Jan 11 11:10 lede-armvirt-root.ext4.gz
-rw-r--r-- 1 yousong yousong 1544593 Jan 11 11:10 lede-armvirt-rootfs.cpio.gz
-rw-r--r-- 1 yousong yousong 1174984 Jan 11 11:10 lede-armvirt-root.squashfs.gz
-rwxr-xr-x 1 yousong yousong 1654736 Jan 11 11:10 lede-armvirt-zImage
-rwxr-xr-x 1 yousong yousong 2738144 Jan 11 11:10 lede-armvirt-zImage-initramfs
drwxr-xr-x 2 yousong yousong 4096 Jan 10 17:35 packages
-rw-r--r-- 1 yousong yousong 739 Jan 10 17:37 sha256sums
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/generic/patches-3.18/204-module_strip.patch | 8 | ||||
-rw-r--r-- | target/linux/generic/patches-4.4/204-module_strip.patch | 8 |
2 files changed, 4 insertions, 12 deletions
diff --git a/target/linux/generic/patches-3.18/204-module_strip.patch b/target/linux/generic/patches-3.18/204-module_strip.patch index dab7799..844c3b5 100644 --- a/target/linux/generic/patches-3.18/204-module_strip.patch +++ b/target/linux/generic/patches-3.18/204-module_strip.patch @@ -5,18 +5,14 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- --- a/include/linux/module.h +++ b/include/linux/module.h -@@ -84,9 +84,10 @@ void trim_init_extable(struct module *m) +@@ -84,6 +84,7 @@ void trim_init_extable(struct module *m) /* Generic info of form tag = "info" */ #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info) +#define MODULE_INFO_STRIP(tag, info) __MODULE_INFO_STRIP(tag, tag, info) /* For userspace: you can also call me... */ --#define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias) -+#define MODULE_ALIAS(_alias) MODULE_INFO_STRIP(alias, _alias) - - /* Soft module dependencies. See man modprobe.d for details. - * Example: MODULE_SOFTDEP("pre: module-foo module-bar post: module-baz") + #define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias) @@ -127,12 +128,12 @@ void trim_init_extable(struct module *m) * Author(s), use "Name <email>" or just "Name", for multiple * authors use multiple MODULE_AUTHOR() statements/lines. diff --git a/target/linux/generic/patches-4.4/204-module_strip.patch b/target/linux/generic/patches-4.4/204-module_strip.patch index 8b807da..85805b3 100644 --- a/target/linux/generic/patches-4.4/204-module_strip.patch +++ b/target/linux/generic/patches-4.4/204-module_strip.patch @@ -5,18 +5,14 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- --- a/include/linux/module.h +++ b/include/linux/module.h -@@ -169,9 +169,10 @@ void trim_init_extable(struct module *m) +@@ -169,6 +169,7 @@ void trim_init_extable(struct module *m) /* Generic info of form tag = "info" */ #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info) +#define MODULE_INFO_STRIP(tag, info) __MODULE_INFO_STRIP(tag, tag, info) /* For userspace: you can also call me... */ --#define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias) -+#define MODULE_ALIAS(_alias) MODULE_INFO_STRIP(alias, _alias) - - /* Soft module dependencies. See man modprobe.d for details. - * Example: MODULE_SOFTDEP("pre: module-foo module-bar post: module-baz") + #define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias) @@ -212,12 +213,12 @@ void trim_init_extable(struct module *m) * Author(s), use "Name <email>" or just "Name", for multiple * authors use multiple MODULE_AUTHOR() statements/lines. |