Re: Exporting symbols from a module.

Anders Peter Fugmann
2001-05-17T16:51:34Z

Resolved.

I just looked at what the kernel did whne compiling a module that
exported some symbols, and discovered that I needed
to set CFLAGS to:

-D__KERNEL__ -I$/usr/src/linux) -Wall -Wstrict-prototypes \
-O2 -fomit-frame-pointer -fno-strict-aliasing -pipe \
-DMODULE -DMODVERSIONS -include \
/usr/src/linux/modversions.h

Now all works correctly, and I can load my modules.

Thanks for all your help.
eps. the tip when I try to compile it in the kernel tree.

Anders Fugmann

Anders Peter Fugmann wrote:

> Hi Andreas.
>
> I now see what you mean, and I will give it a try.
>
> But actually I'm not compiling it under the linux kernel tree, and I
> really would like a way to export symbols, while compiling outside the
> kernel tree. How would I accomplish that?
>
> Regards
> Anders Fugmann
>
>