public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: Stephen Wille Padnos <stephenwp@adelphia.net>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: Exporting new functions from kernel 2.2.14
Date: Wed, 06 Jun 2001 00:59:39 +1000	[thread overview]
Message-ID: <18174.991753179@ocs3.ocs-net> (raw)
In-Reply-To: Your message of "Tue, 05 Jun 2001 10:32:41 MST." <3B1D17B9.92D046A1@adelphia.net>

On Tue, 05 Jun 2001 10:32:41 -0700, 
Stephen Wille Padnos <stephenwp@adelphia.net> wrote:
>Unfortunately, the printk warning was still there.
>
>I replaced the unconditional #define MODVERSIONS with
>#include <linux/config.h>
>#ifdef CONFIG_MODVERSIONS
>#define MODVERSIONS
>#include <linux/modversions.h>
>#endif
>
>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

(1) -DMODULE
(2) -DMODVERSIONS -include $(TOPDIR)/include/linux/modversions.h
(3) -DEXPORT_SYMTAB

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.


  reply	other threads:[~2001-06-05 15:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-05 15:54 Exporting new functions from kernel 2.2.14 Stephen Wille Padnos
2001-06-05 13:10 ` Arthur Naseef
2001-06-05 13:24   ` Keith Owens
2001-06-05 13:25     ` Arthur Naseef
2001-06-05 17:09   ` Stephen Wille Padnos
2001-06-05 17:32     ` Stephen Wille Padnos
2001-06-05 14:59       ` Keith Owens [this message]
2001-06-05 13:23 ` Keith Owens
2001-06-05 17:10   ` Stephen Wille Padnos
2001-06-05 14:22     ` Keith Owens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18174.991753179@ocs3.ocs-net \
    --to=kaos@ocs.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stephenwp@adelphia.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox