RE: Exporting symbols from a module.

2001-05-17 Thread Khachaturov, Vassilii
t; To: Andreas Dilger > Cc: linux-kernel > Subject: Re: Exporting symbols from a module. > > > 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__KE

Re: Exporting symbols from a module.

2001-05-17 Thread Anders Peter Fugmann
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

Re: Exporting symbols from a module.

2001-05-17 Thread Anders Peter Fugmann
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 Andreas Dilger wrote:

Re: Exporting symbols from a module.

2001-05-17 Thread Anders Peter Fugmann
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 Andreas Dilger wrote:

Re: Exporting symbols from a module.

2001-05-17 Thread Anders Peter Fugmann
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

RE: Exporting symbols from a module.

2001-05-17 Thread Khachaturov, Vassilii
: Exporting symbols from a module. 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

Re: Exporting symbols from a module.

2001-05-15 Thread Andreas Dilger
Anders Fugmann writes: > I'm not sure where to put this in my Makefile. > (tried, but it did not help) > Could you please send an example. See fs/Makefile or fs/msdos/Makefile for examples. I assume you are building your module under the kernel tree? Cheers, Andreas -- Andreas Dilger \ "If a

Re: Exporting symbols from a module.

2001-05-15 Thread Anders Peter Fugmann
Hi. Thanks for your reply. I'm not sure where to put this in my Makefile. (tried, but it did not help) Could you please send an example. Thanks in advance. Anders Fugmann Andreas Dilger wrote: >> > I just recently had this problem, and your Makefile is missing: > > export-objs := .o > >

Re: Exporting symbols from a module.

2001-05-15 Thread Andreas Dilger
Anders Fugmann writes: > I've got a simple question - how export symbols from one module, and use > them in another. > > I have two modules - 'kvaser' and 'can_master'. > 'kvaser' exports some functions, and 'can_master' needs to use call > these functions. > > I used EXPORT_SYMBOL, and

Re: Exporting symbols from a module.

2001-05-15 Thread Andreas Dilger
Anders Fugmann writes: I've got a simple question - how export symbols from one module, and use them in another. I have two modules - 'kvaser' and 'can_master'. 'kvaser' exports some functions, and 'can_master' needs to use call these functions. I used EXPORT_SYMBOL, and declared the

Re: Exporting symbols from a module.

2001-05-15 Thread Anders Peter Fugmann
Hi. Thanks for your reply. I'm not sure where to put this in my Makefile. (tried, but it did not help) Could you please send an example. Thanks in advance. Anders Fugmann Andreas Dilger wrote: I just recently had this problem, and your Makefile is missing: export-objs := file name.o

Re: Exporting symbols from a module.

2001-05-15 Thread Andreas Dilger
Anders Fugmann writes: I'm not sure where to put this in my Makefile. (tried, but it did not help) Could you please send an example. See fs/Makefile or fs/msdos/Makefile for examples. I assume you are building your module under the kernel tree? Cheers, Andreas -- Andreas Dilger \ If a man