Regarding module init function

Dave Hylands dhylands at
Tue Jan 8 08:31:16 EST 2013


On Tue, Jan 8, 2013 at 11:08 AM, Rahul Bedarkar <rpal143 at> 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.

If you look here:

module_init is mapped to __initcall, which is in turn mapped to
device_initcall, which sets up a pointer in a section called .initcall6.init

If you then look in the kernel linker script:

INIT_CALLS is defined here:

and it defines the __initcall_start and __initcall_end symbols.

Dave Hylands
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Kernelnewbies mailing list