when and where sock_init() excutes in linux-2.6.35.4.

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

 



Hi all!
I have a question about when and where sock_init() excutes in linux-2.6.35.4.
As I know, when in the old version such as linux-2.6.16, it looks like as fllow:

start_kernel->rest_init->kernel_thread(init)
init->do_basic_setup->sock_init

But now in linux-2.6.35.4, sock_init has gone when do_basic_setup excutes.
I notice the some information in linux-2.6.35.4

/linux-2.6.35.4/include/init/init.h
#define __define_initcall(level,fn,id) \
static initcall_t __initcall_##fn##id __used \
__attribute__((__section__(".initcall" level ".init"))) = fn
#define core_initcall(fn) __define_initcall("1",fn,1)

/linux-2.6.35.4/net/socket.c
core_initcall(sock_init); /* early initcall */

/linux-2.6.35.4/init/main.c
static void __init do_initcalls(void)
{
initcall_t *fn;
for (fn = __early_initcall_end; fn < __initcall_end; fn++)
do_one_initcall(*fn);
/* Make sure there is no pending stuff from the initcall sequence */
flush_scheduled_work();
}

when in linux-2.6.18/arch/i386/kernel/vmlinux.lds.S
  .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) {
*(.initcall1.init) 
*(.initcall2.init) 
*(.initcall3.init) 
*(.initcall4.init) 
*(.initcall5.init) 
*(.initcall6.init) 
*(.initcall7.init)
  }
  __initcall_end = .;
now in linux-2.6.35.4/arch/, there is no i386/, so i reached to x86/kernel/vmlinux.lds.S
but in this file, i found no information about section .initcall1.init ~ .initcall7.init

So i confused when and where sock_init() excutes in linux-2.6.35.4

Any reply is welcome. Thanks and have a nice day!
Best Wishes!

2010-09-13 
huangqiang.zhou 

--
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
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