Arm+linux startup process into the kernel

  
 Or from the process of compiling the link to generate vmlinux, it is made up of a bunch of .o files, the first one is
kernel\\arch\\arm\\kernel\\head-armv.o, and we also see < Br>lds link file kernel\\arch\\arm\\vmlinux.lds, analyze it first
ENTRY(stext) //The entry point is stext should be in head-armv.s
SECTIONS
{
. 0xC0008000; //base address is the virtual address from the kernel
.init : { /* Init code and data */
_stext = .;
__init_begin = .;
*(.text.init)
__proc_info_begin = .;
*(.proc.info)
__proc_info_end = .;
__arch_info_begin = .;
*(.arch.info)< Br>__arch_info_end = .;
__tagtable_begin = .;
*(.taglist)
__tagtable_end = .;
*(.data.init)
. = ALIGN(16);
__setup_start = .;
*(.setup.init)
__setup_end = .;
__initcall_start = .;
*(.initcall.init)
__initcall_end = .;
. = ALIGN(4096);
__init_end = .;
}
About virtual and physical addresses: After using MMU, the system will use the virtual address to point to the actual object through the MMU. Here we address the 0xC0008000 actual physical address is 0x30008000,
introduce specific reference to "ARM architecture and programming" on the MMU.
Find the entry to the head-armv.s program
.section ".text.init",#alloc,#execinstr
.type stext, #function
ENTRY(stext)
Mov r12, r0
mov r0, #F_BIT
Copyright © Windows knowledge All Rights Reserved