mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-29 09:13:38 +00:00
modpost: use __section in the output to *.mod.c
Use the __section() shorthand. This avoids escaping double-quotes, and improves the readability. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
parent
6df7e1ec93
commit
a3d0cb04f7
@ -2176,7 +2176,7 @@ static void add_header(struct buffer *b, struct module *mod)
|
||||
buf_printf(b, "MODULE_INFO(name, KBUILD_MODNAME);\n");
|
||||
buf_printf(b, "\n");
|
||||
buf_printf(b, "__visible struct module __this_module\n");
|
||||
buf_printf(b, "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n");
|
||||
buf_printf(b, "__section(.gnu.linkonce.this_module) = {\n");
|
||||
buf_printf(b, "\t.name = KBUILD_MODNAME,\n");
|
||||
if (mod->has_init)
|
||||
buf_printf(b, "\t.init = init_module,\n");
|
||||
@ -2230,8 +2230,7 @@ static int add_versions(struct buffer *b, struct module *mod)
|
||||
|
||||
buf_printf(b, "\n");
|
||||
buf_printf(b, "static const struct modversion_info ____versions[]\n");
|
||||
buf_printf(b, "__used\n");
|
||||
buf_printf(b, "__attribute__((section(\"__versions\"))) = {\n");
|
||||
buf_printf(b, "__used __section(__versions) = {\n");
|
||||
|
||||
for (s = mod->unres; s; s = s->next) {
|
||||
if (!s->module)
|
||||
|
Loading…
Reference in New Issue
Block a user