[lkml]   [2001]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Exporting new functions from kernel 2.2.14
On Tue, 05 Jun 2001 10:32:41 -0700, 
Stephen Wille Padnos <> wrote:
>Unfortunately, the printk warning was still there.
>I replaced the unconditional #define MODVERSIONS with
>#include <linux/config.h>
>#include <linux/modversions.h>
>this is at the top of my source file. (before module.h and linux.h)
>(as seen somewhere on the web)

And like many things on the web, it is wrong. Do not put anything in
the source code expect #include <linux/module.h> as the first include.
In particular do not include modversions.h yourself, it will break in
2.5. You compile a module with these gcc flags

(2) -DMODVERSIONS -include $(TOPDIR)/include/linux/modversions.h

All modules get flag (1).
All modules get flags (2) but only if .config contains
CONFIG_MODVERSIONS, otherwise omit these flags.
Only modules that export symbols get flag (3).

That is what the standard kernel Makefiles do and is the only correct
way to compile modules.

Keith Owens, kernel build and modutils maintainer.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:54    [W:0.046 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site