All of lore.kernel.org
 help / color / mirror / Atom feed
From: tobias@gambas-buch.de (Tobias Boege)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Regarding module init function
Date: Tue, 8 Jan 2013 14:51:07 +0100	[thread overview]
Message-ID: <20130108135107.GA560@aurora> (raw)
In-Reply-To: <CA+NV+VkRx6O35SLtHO2P21j9j6v71sW2gK5YLiqq48A+af+hig@mail.gmail.com>

On Tue, 08 Jan 2013, Rahul Bedarkar wrote:
> Ok. in init/main.c we call do_basic_setup(). Where do_initcalls call each
> of init functions from __early_initcall_end to __initcall_end. But I don't
> know from where these values gets initialized.
> 

Take a look at include/linux/init.h. There you can find the macros for
declaring various init functions. They all go into special sections. The
rest is linker magic (e.g. arch/x86/kernel/vmlinux.lds{,.S}).

> I want to know when one of auxdriver (selected in from menuconfig) is built
> as built-in module. When and Who calls it's init function ?

It's, too, in the init.h. There are two definitions of module_init()
depending on whether MODULE is declared or not. The first definition is
accompanied by a useful comment about where the init function is called in
either case.

Regards,
Tobi

  parent reply	other threads:[~2013-01-08 13:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-04 11:18 Regarding module init function Rahul Bedarkar
2013-01-04 13:22 ` Tobias Boege
2013-01-08  8:40   ` Rahul Bedarkar
2013-01-08 10:08     ` Rahul Bedarkar
2013-01-08 13:31       ` Dave Hylands
2013-01-08 13:50         ` Rahul Bedarkar
2013-01-08 14:33           ` Dave Hylands
2013-01-08 13:51       ` Tobias Boege [this message]
2013-01-08 16:44         ` anish kumar
2013-01-10  8:47           ` Tobias Boege
2013-01-12  5:49             ` Dave Hylands

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130108135107.GA560@aurora \
    --to=tobias@gambas-buch.de \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.