[PATCH] kbuild: using well known kernel symbols as module names.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Here is a Thayumanavar's ([email protected]) 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux