Re: Writing Module in kernel...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> 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

> -
> : 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
>


-
: 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


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux