lkml.org 
[lkml]   [2005]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[kbuild 1/5] Warn when building external modules without modversions
    This adds a warning when building external modules (M= or SUBDIRS=
    syntax) and there is no Module.symvers in the object tree. A missing
    Module.symvers is a clear sign that the kernel tree itself was never
    compiled. The resulting modules will work, but no symbol version
    information will be attached to kernel symbols the module uses (because
    that information comes from Module.symvers), and so the module will be
    more unsafe.

    The test works with CONFIG_MODVERSIONS enabled or disabled.

    Signed-off-by: Andreas Gruenbacher <agruen@suse.de>

    Index: linux-2.6.11-rc1-bk6/Makefile
    ===================================================================
    --- linux-2.6.11-rc1-bk6.orig/Makefile
    +++ linux-2.6.11-rc1-bk6/Makefile
    @@ -1093,9 +1093,17 @@ KBUILD_MODULES := 1
    crmodverdir:
    $(Q)mkdir -p $(MODVERDIR)

    +.PHONY: $(objtree)/Module.symvers
    +$(objtree)/Module.symvers:
    + @test -e $(objtree)/Module.symvers || ( \
    + echo; \
    + echo "WARNING: Symbol version dump $(objtree)/Module.symvers is " \
    + "missing; modules will have no modversions."; \
    + echo )
    +
    module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD))
    .PHONY: $(module-dirs) modules
    -$(module-dirs): crmodverdir
    +$(module-dirs): crmodverdir $(objtree)/Module.symvers
    $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)

    modules: $(module-dirs)
    --
    Andreas Gruenbacher <agruen@suse.de>
    SUSE Labs, SUSE LINUX PRODUCTS GMBH

    -
    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-03-22 14:09    [W:2.132 / U:0.116 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site