This makes *.mod.c much more readable. I confirmed depmod still produced the same modules.dep file.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -2267,10 +2267,7 @@ static void add_depends(struct buffer *b, struct module *mod) · 2266 unmodified lines | |||
| 2267 | s->module->seen = is_vmlinux(s->module->name); | 2267 | s->module->seen = is_vmlinux(s->module->name); |
| 2268 | 2268 | ||
| 2269 | buf_printf(b, "\n"); | 2269 | buf_printf(b, "\n"); |
| 2270 | buf_printf(b, "static const char __module_depends[]\n"); | 2270 | buf_printf(b, "MODULE_INFO(depends, \""); |
| 2271 | buf_printf(b, "__used\n"); | ||
| 2272 | buf_printf(b, "__attribute__((section(\".modinfo\"))) =\n"); | ||
| 2273 | buf_printf(b, "\"depends="); | ||
| 2274 | for (s = mod->unres; s; s = s->next) { | 2271 | for (s = mod->unres; s; s = s->next) { |
| 2275 | const char *p; | 2272 | const char *p; |
| 2276 | if (!s->module) | 2273 | if (!s->module) |
| @@ -2288,7 +2285,7 @@ static void add_depends(struct buffer *b, struct module *mod) · 11 unmodified lines | |||
| 2288 | buf_printf(b, "%s%s", first ? "" : ",", p); | 2285 | buf_printf(b, "%s%s", first ? "" : ",", p); |
| 2289 | first = 0; | 2286 | first = 0; |
| 2290 | } | 2287 | } |
| 2291 | buf_printf(b, "\";\n"); | 2288 | buf_printf(b, "\");\n"); |
| 2292 | } | 2289 | } |
| 2293 | 2290 | ||
| 2294 | static void add_srcversion(struct buffer *b, struct module *mod) | 2291 | static void add_srcversion(struct buffer *b, struct module *mod) |