Re: Writing Module in kernel...

From: Deepika Kakrania (deepika@sasken.com)
Date: Tue Aug 28 2001 - 04:51:06 EST


> On Tue, 28 Aug 2001 12:22:07 +0530 (IST),
> Deepika Kakrania <deepika@sasken.com> wrote:
> >#ifdef CONFIG_NET_MY_KERNEL
> >Now the problem is that if I choose to have this code as a module(
> >CONFIG_NET_MY_KERNEL=m), the code in standard files won't get compiled.Isn't it?
>
> #if defined(CONFIG_NET_MY_KERNEL) || defined(CONFIG_NET_MY_KERNEL_MODULE)
>

yeah, that will work fine. But another problem is that the code in beween
this #define calls a function which is being defined in a file which is
compiled only if I do "make modules".

Ex.
#if defined(CONFIG_NET_MY_KERNEL) || defined(CONFIG_NET_MY_KERNEL_MODULE)

   start_my_module();
#endif

But start_my_module() is defined in a file called my_file.c which gets
compiled only if I do make modules. And so this situation gives undefined
reference to start_my_module for above case.

Can I know how I can solve this problem?

Regards,
Deepika

> -
> To unsubscribe from this list: send the line "unsubscribe linux-net" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html



This archive was generated by hypermail 2b29 : Fri Aug 31 2001 - 21:00:38 EST