From: Ustyugov Roman <dr_unique@ymg.ru>
To: thayumk@gmail.com, lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH] kbuild: using well known kernel symbols as module names.
Date: Tue, 20 Sep 2005 13:32:31 +0400 [thread overview]
Message-ID: <200509201332.32333.dr_unique@ymg.ru> (raw)
In-Reply-To: <3b8510d8050920015139d45449@mail.gmail.com>
Here is a Thayumanavar's (thayumk@gmail.com) patch with small changes. I have
to use double quotes, but not single ones.
Problem was solved.
--- linux/scripts/Makefile.lib.orig 2005-03-02 10:38:09.000000000 +0300
+++ linux/scripts/Makefile.lib 2005-09-20 13:14:13.000000000 +0400
@@ -96,7 +96,7 @@ depfile = $(subst $(comma),_,$(@D)/.$(@F
# than one module. In that case KBUILD_MODNAME will be set to foo_bar,
# where foo and bar are the name of the modules.
basename_flags = -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F)))
-modname_flags = $(if $(filter 1,$(words
$(modname))),-DKBUILD_MODNAME=$(subst $(comma),_,$(subst -,_,$(modname))))
+modname_flags = $(if $(filter 1,$(words $(modname))),-D"DUM(a)=\#a"
-D"KBUILD_MODNAME=DUM($(subst $(comma),_,$(subst -,_,$(modname))))")
_c_flags = $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(*F).o)
_a_flags = $(AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o)
--- linux/scripts/mod/modpost.c.orig 2005-07-23 04:41:06.000000000 +0400
+++ linux/scripts/mod/modpost.c 2005-09-20 13:19:21.000000000 +0400
@@ -575,7 +575,7 @@ add_header(struct buffer *b, struct modu
buf_printf(b, "#undef unix\n"); /* We have a module called "unix" */
buf_printf(b, "struct module __this_module\n");
buf_printf(b, "__attribute__((section(\".gnu.linkonce.this_module\"))) =
{\n");
- buf_printf(b, " .name = __stringify(KBUILD_MODNAME),\n");
+ buf_printf(b, " .name = KBUILD_MODNAME,\n");
if (mod->has_init)
buf_printf(b, " .init = init_module,\n");
if (mod->has_cleanup)
--
RomanU
next prev parent reply other threads:[~2005-09-20 9:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-19 10:32 [BUG] module-init-tools Ustyugov Roman
2005-09-19 11:30 ` Coywolf Qi Hunt
2005-09-19 11:54 ` Ustyugov Roman
2005-09-19 13:21 ` Coywolf Qi Hunt
[not found] ` <3b8510d8050920000560aeb39e@mail.gmail.com>
[not found] ` <3b8510d805092000116c6a9c33@mail.gmail.com>
2005-09-20 7:24 ` Ustyugov Roman
[not found] ` <3b8510d8050920002661c08f48@mail.gmail.com>
[not found] ` <3b8510d805092000346c27270f@mail.gmail.com>
2005-09-20 7:43 ` Thayumanavar Sachithanantham
2005-09-20 8:13 ` [BUG] kbuild Ustyugov Roman
2005-09-20 8:51 ` Thayumanavar Sachithanantham
2005-09-20 9:32 ` Ustyugov Roman [this message]
2005-09-20 9:32 ` [PATCH] kbuild: using well known kernel symbols as module names Thayumanavar Sachithanantham
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200509201332.32333.dr_unique@ymg.ru \
--to=dr_unique@ymg.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=thayumk@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.