adr r0, _start
/* r0 <- current position of code */
ldr r1, _TEXT_BASE
/* test if we run from flash or RAM */
cmp r0, r1
/* don't reloc during debug */
beq stack_setup
ldr r2, _armboot_start
ldr r3, _bss_start
sub r2, r3, r2
/* r2 <- size of armboot */
add r2, r0, r2
/* r2 <- source end address */
copy_loop:
ldmia r0!, {r3-r10}
问:adr r0, _start R0是0x0000000c吧,那么到了这儿ldmia r0!, {r3-r10} ,就是从地址0x0000000c开始复制代码,那前面0x00000000-0x0000000c的代码不就被忽略了吗? |