diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-09-09 20:34:23 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-09-14 11:40:13 +0900 |
commit | a3d0cb04f7df257b4dffec5e352b8e192824619c (patch) | |
tree | f44ec9a8648fa799239113ca2f224626ae6e3478 | |
parent | 6df7e1ec932a330c931ed747ed824639fb04133e (diff) | |
download | linux-a3d0cb04f7df257b4dffec5e352b8e192824619c.tar.bz2 |
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>
-rw-r--r-- | scripts/mod/modpost.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 25036947bcb8..820eed87fb43 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -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) |