Re: Directly linked modules

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

 



On Mon, 22 Nov 2004 09:38:56 +0500, Zeeshan Ali <zeenix@xxxxxxxxx> wrote:
> Hello,
> 
> On Sun, 21 Nov 2004 23:46:28 +0200, patryk konczyk <patryk@xxxxxxxxxx> wrote:
> > Thera are many papers about writing dynamic loadable modules but i can't
> > find any technical informations about writing directly linked into kernel
> > modules.

> From the point of view of Kernel module developer, there is NO
> difference at all.

In recent kernel versions, using module_init and module_exit will
cause do_initcalls to call your module init function during boot, but
otherwise it would be necessary to explicitly mark the init code using
something like __initcall(). It's also a good idea to mark functions
which are compiled in and will be jettisoned after kernel boot with
__init and __exit tags.

The important point here (and reason for posting) is that there *is* a
difference between compiling code in and not compiling it in (this
still shows up with things like netdev's which might be predeclared if
you're compiling in) but the build process massages this for you and
makes it all fluffy. Let's not pretend this isn't complex stuff
underneath though.

Cheers,

Jon.

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux