lkml.org 
[lkml]   [2005]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] kbuild: using well known kernel symbols as module names.
    Date

    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
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-09-20 12:06    [W:0.064 / U:3.280 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site