• Rusty Russell's avatar
    [PATCH] KBUILD_MODNAME define for build system · 850b830c
    Rusty Russell authored
    By Kai Germaschewski.
    
    This patch adds a -DKBUILD_MODNAME to the kernel compile, which
    contains the base of the module name which is being built.
    
     - Some sreorganization of the c_flags since they're needed for
       generating modversions (.ver) and compiling
     - Use the right KBUILD_MODNAME also when the user just wants a .i/.s/.lst
       file for debugging and also when generating modversions
     - It looks like with your current approach you can't have a ',' or '-' in
       KBUILD_MODNAME - however, that means that KBUILD_MODNAME is not quite
       right for passing module parameters for built-in modules on the command
       line, it would be confusing to pass parameters for ide-cd as
       ide_cd.foo=whatever. So that part could use a little more thought.
     - If you think your module_names trick makes a noticable difference, feel
       free to re-add it.
     - It's possible that objects are linked into more than one module - I
       suppose this shouldn't be a problem, since these objects hopefully
       don't have a module_init() nor do they export symbols. Not sure if your
       patch did handle this.
    850b830c
af_unix.c 42.3 KB