Hi Rock, On Mon, Aug 3, 2015 at 7:28 PM, Rock Lee <rocklee_...@outlook.com> wrote: > > Hi, all: > I print a local variable address in start_kernel(), and I realize this > address is between __data_start and _edata. In my opinion, > local variables should be located in stack, why is this local variable > located in data section? BTW, I use a arm11 board with linux-2.6.28.
If you look at the linker script file for the kernel http://lxr.free-electrons.com/source/arch/arm/kernel/vmlinux.lds.S#L244 , you'll see that INIT_TASK_DATA (which includes the kernel stack) is between _data and _edata. This is the stack used for kernel booting and then taken over by the init task. -- Dave Hylands Shuswap, BC, Canada http://www.davehylands.com
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies