OpenWrt – Diff between revs 2 and 3
?pathlinks?
Rev 2 | Rev 3 | |||
---|---|---|---|---|
Line 112... | Line 112... | |||
112 | endif # MODULES |
112 | endif # MODULES |
|
Line 113... | Line 113... | |||
113 | |
113 | |
|
114 | config MODULES_TREE_LOOKUP |
114 | config MODULES_TREE_LOOKUP |
|
115 | --- a/kernel/module.c |
115 | --- a/kernel/module.c |
|
116 | +++ b/kernel/module.c |
116 | +++ b/kernel/module.c |
|
Line 117... | Line 117... | |||
117 | @@ -3008,9 +3008,11 @@ static struct module *setup_load_info(st |
117 | @@ -3006,9 +3006,11 @@ static struct module *setup_load_info(st |
|
118 | |
118 | |
|
119 | static int check_modinfo(struct module *mod, struct load_info *info, int flags) |
119 | static int check_modinfo(struct module *mod, struct load_info *info, int flags) |
|
120 | { |
120 | { |
|
Line 125... | Line 125... | |||
125 | + const char *modmagic = get_modinfo(info, "vermagic"); |
125 | + const char *modmagic = get_modinfo(info, "vermagic"); |
|
126 | + |
126 | + |
|
127 | if (flags & MODULE_INIT_IGNORE_VERMAGIC) |
127 | if (flags & MODULE_INIT_IGNORE_VERMAGIC) |
|
128 | modmagic = NULL; |
128 | modmagic = NULL; |
|
Line 129... | Line 129... | |||
129 | |
129 | |
|
130 | @@ -3031,6 +3033,7 @@ static int check_modinfo(struct module * |
130 | @@ -3029,6 +3031,7 @@ static int check_modinfo(struct module * |
|
131 | mod->name); |
131 | mod->name); |
|
132 | add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK); |
132 | add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK); |
|
133 | } |
133 | } |
|
Line 134... | Line 134... | |||
134 | +#endif |
134 | +#endif |
|
Line 135... | Line 135... | |||
135 | |
135 | |
|
136 | check_modinfo_retpoline(mod, info); |
136 | check_modinfo_retpoline(mod, info); |
|
137 | |
137 | |
|
138 | --- a/scripts/mod/modpost.c |
138 | --- a/scripts/mod/modpost.c |
|
Line 139... | Line 139... | |||
139 | +++ b/scripts/mod/modpost.c |
139 | +++ b/scripts/mod/modpost.c |
|
140 | @@ -1984,7 +1984,9 @@ static void read_symbols(char *modname) |
140 | @@ -1982,7 +1982,9 @@ static void read_symbols(char *modname) |
|
141 | symname = remove_dot(info.strtab + sym->st_name); |
141 | symname = remove_dot(info.strtab + sym->st_name); |
|
142 | |
142 | |
|
143 | handle_modversions(mod, &info, sym, symname); |
143 | handle_modversions(mod, &info, sym, symname); |
|
144 | +#ifndef CONFIG_MODULE_STRIPPED |
144 | +#ifndef CONFIG_MODULE_STRIPPED |
|
145 | handle_moddevtable(mod, &info, sym, symname); |
145 | handle_moddevtable(mod, &info, sym, symname); |
|
146 | +#endif |
146 | +#endif |
|
147 | } |
147 | } |
|
148 | if (!is_vmlinux(modname) || |
148 | if (!is_vmlinux(modname) || |
|
149 | (is_vmlinux(modname) && vmlinux_section_warnings)) |
149 | (is_vmlinux(modname) && vmlinux_section_warnings)) |
|
150 | @@ -2145,8 +2147,10 @@ static void add_header(struct buffer *b, |
150 | @@ -2143,8 +2145,10 @@ static void add_header(struct buffer *b, |
|
151 | buf_printf(b, "#include <linux/vermagic.h>\n"); |
151 | buf_printf(b, "#include <linux/vermagic.h>\n"); |
|
152 | buf_printf(b, "#include <linux/compiler.h>\n"); |
152 | buf_printf(b, "#include <linux/compiler.h>\n"); |
|
153 | buf_printf(b, "\n"); |
153 | buf_printf(b, "\n"); |
|
154 | +#ifndef CONFIG_MODULE_STRIPPED |
154 | +#ifndef CONFIG_MODULE_STRIPPED |
|
155 | buf_printf(b, "MODULE_INFO(vermagic, VERMAGIC_STRING);\n"); |
155 | buf_printf(b, "MODULE_INFO(vermagic, VERMAGIC_STRING);\n"); |
|
156 | buf_printf(b, "MODULE_INFO(name, KBUILD_MODNAME);\n"); |
156 | buf_printf(b, "MODULE_INFO(name, KBUILD_MODNAME);\n"); |
|
157 | +#endif |
157 | +#endif |
|
Line 158... | Line 158... | |||
158 | buf_printf(b, "\n"); |
158 | buf_printf(b, "\n"); |
|
159 | buf_printf(b, "__visible struct module __this_module\n"); |
159 | buf_printf(b, "__visible struct module __this_module\n"); |
|
160 | buf_printf(b, "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n"); |
160 | buf_printf(b, "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n"); |
|
161 | @@ -2163,8 +2167,10 @@ static void add_header(struct buffer *b, |
161 | @@ -2161,8 +2165,10 @@ static void add_header(struct buffer *b, |
|
162 | |
162 | |
|
163 | static void add_intree_flag(struct buffer *b, int is_intree) |
163 | static void add_intree_flag(struct buffer *b, int is_intree) |
|
164 | { |
164 | { |
|
Line 165... | Line 165... | |||
165 | +#ifndef CONFIG_MODULE_STRIPPED |
165 | +#ifndef CONFIG_MODULE_STRIPPED |
|
166 | if (is_intree) |
166 | if (is_intree) |
|
Line 167... | Line 167... | |||
167 | buf_printf(b, "\nMODULE_INFO(intree, \"Y\");\n"); |
167 | buf_printf(b, "\nMODULE_INFO(intree, \"Y\");\n"); |
|
168 | +#endif |
168 | +#endif |
|
169 | } |
169 | } |
|
170 | |
170 | |
|
Line 180... | Line 180... | |||
180 | buf_printf(b, "\nMODULE_INFO(staging, \"Y\");\n"); |
180 | buf_printf(b, "\nMODULE_INFO(staging, \"Y\");\n"); |
|
181 | +#endif |
181 | +#endif |
|
182 | } |
182 | } |
|
Line 183... | Line 183... | |||
183 | |
183 | |
|
184 | /** |
184 | /** |
|
Line 185... | Line 185... | |||
185 | @@ -2279,11 +2287,13 @@ static void add_depends(struct buffer *b |
185 | @@ -2277,11 +2285,13 @@ static void add_depends(struct buffer *b |
|
186 | |
186 | |
|
187 | static void add_srcversion(struct buffer *b, struct module *mod) |
187 | static void add_srcversion(struct buffer *b, struct module *mod) |
|
188 | { |
188 | { |
|
Line 194... | Line 194... | |||
194 | } |
194 | } |
|
195 | +#endif |
195 | +#endif |
|
196 | } |
196 | } |
|
Line 197... | Line 197... | |||
197 | |
197 | |
|
198 | static void write_if_changed(struct buffer *b, const char *fname) |
198 | static void write_if_changed(struct buffer *b, const char *fname) |
|
199 | @@ -2520,7 +2530,9 @@ int main(int argc, char **argv) |
199 | @@ -2518,7 +2528,9 @@ int main(int argc, char **argv) |
|
200 | add_staging_flag(&buf, mod->name); |
200 | add_staging_flag(&buf, mod->name); |
|
201 | err |= add_versions(&buf, mod); |
201 | err |= add_versions(&buf, mod); |
|
202 | add_depends(&buf, mod, modules); |
202 | add_depends(&buf, mod, modules); |
|
203 | +#ifndef CONFIG_MODULE_STRIPPED |
203 | +#ifndef CONFIG_MODULE_STRIPPED |