2003-09-22 16:07:46

by Kirk Reiser

[permalink] [raw]
Subject: unknown symbols loading modules under 2.6.x

Hello Everyone: I have been trying to hunt down the answer to
aproblem I am having attempting to load my modules under the 2.6.x
kernels. They load just fine under the 2.4.x kernels. Have there
been changes which need to be made to get symbols found with modprobe
other than the EXPORT_SYMBOL() macro? The symbols show up in the
modules.symbols file created by depmod. They appear to reference the
correct loadable module. The loadable module these symbols are
exported in however is comprised of two separate .o files during
compile. I am not sure whether that has anything to do with it or
not.

If someone could give me an idea what to read to solve this I'd
appreciate it.

Kirk


2003-09-22 16:25:30

by Randy.Dunlap

[permalink] [raw]
Subject: Re: unknown symbols loading modules under 2.6.x

On Mon, 22 Sep 2003 12:07:45 -0400 Kirk Reiser <[email protected]> wrote:

| Hello Everyone: I have been trying to hunt down the answer to
| aproblem I am having attempting to load my modules under the 2.6.x
| kernels. They load just fine under the 2.4.x kernels. Have there
| been changes which need to be made to get symbols found with modprobe
| other than the EXPORT_SYMBOL() macro? The symbols show up in the
| modules.symbols file created by depmod. They appear to reference the
| correct loadable module. The loadable module these symbols are
| exported in however is comprised of two separate .o files during
| compile. I am not sure whether that has anything to do with it or
| not.
|
| If someone could give me an idea what to read to solve this I'd
| appreciate it.

Make sure that you have the current version of module-init-tools
installed from http://www.kernel.org/pub/linux/kernel/people/rusty/modules/
and that scripts are using them (ie, check PATH).

If it's still not working, please post more complete info about the
problem.

--
~Randy

2003-09-22 16:34:42

by Sam Ravnborg

[permalink] [raw]
Subject: Re: unknown symbols loading modules under 2.6.x

On Mon, Sep 22, 2003 at 09:18:00AM -0700, Randy.Dunlap wrote:
> On Mon, 22 Sep 2003 12:07:45 -0400 Kirk Reiser <[email protected]> wrote:
>
> | Hello Everyone: I have been trying to hunt down the answer to
> | aproblem I am having attempting to load my modules under the 2.6.x
> | kernels. They load just fine under the 2.4.x kernels. Have there
> | been changes which need to be made to get symbols found with modprobe
> | other than the EXPORT_SYMBOL() macro? The symbols show up in the
> | modules.symbols file created by depmod. They appear to reference the
> | correct loadable module. The loadable module these symbols are
> | exported in however is comprised of two separate .o files during
> | compile. I am not sure whether that has anything to do with it or
> | not.
> |
> | If someone could give me an idea what to read to solve this I'd
> | appreciate it.
>
> Make sure that you have the current version of module-init-tools
> installed from http://www.kernel.org/pub/linux/kernel/people/rusty/modules/
> and that scripts are using them (ie, check PATH).

Also make sure that you use kbuild when compiling your module.
See Documentation/modules.txt (or Documentation/kbuild/modules.txt
in BK-latest).

Sam

2003-09-22 16:49:18

by John Levon

[permalink] [raw]
Subject: Re: unknown symbols loading modules under 2.6.x

On Mon, Sep 22, 2003 at 06:34:32PM +0200, Sam Ravnborg wrote:

> Also make sure that you use kbuild when compiling your module.

Talking of which, how hard would it be to fix make clean and make
modules_install for this ?

Current make clean with SUBDIRS set still cleans out the entire kernel
tree, and modules_install wipes out the entire target modules directory.

It would be nice to see at least the latter fixed so there's a simple
way for building modules against 2.6 series (especially since it's
already way nicer than the contortions for 2.2 and 2.4).

regards
john

--
Khendon's Law:
If the same point is made twice by the same person, the thread is over.

2003-09-22 19:56:57

by Sam Ravnborg

[permalink] [raw]
Subject: Re: unknown symbols loading modules under 2.6.x

On Mon, Sep 22, 2003 at 05:49:16PM +0100, John Levon wrote:
> On Mon, Sep 22, 2003 at 06:34:32PM +0200, Sam Ravnborg wrote:
>
> > Also make sure that you use kbuild when compiling your module.
>
> Talking of which, how hard would it be to fix make clean and make
> modules_install for this ?
>
> Current make clean with SUBDIRS set still cleans out the entire kernel
> tree, and modules_install wipes out the entire target modules directory.
>
> It would be nice to see at least the latter fixed so there's a simple
> way for building modules against 2.6 series (especially since it's
> already way nicer than the contortions for 2.2 and 2.4).

I'm planning to looking into building external modules as next step.
Linus just merged the "Separate output directory" patch, and
proper support for external modules is a natural next step.

So if nothing shows up in the next few days I wil try looking into that.
I have a few mails saved on the topic, but the above was also good inputs.

Sam