/* Stage 22: where the arm64 kernel lives in memory (QEMU virt). * * QEMU's virt has RAM from 0x4000_0000 and, for an ELF kernel, puts the * device tree at the very start of it. We start 2 MiB in, at 0x4020_0000, * and QEMU loads each part of the ELF file at these addresses (the MMU is * off, so they are physical addresses) and jumps to _start. */ ENTRY(_start) SECTIONS { . = 0x40200000; __kernel_start = .; .text : { KEEP(*(.text.boot)) /* _start first */ *(.text .text.*) } .rodata : ALIGN(16) { *(.rodata .rodata.*) } .got : ALIGN(8) { *(.got .got.*) } .data : ALIGN(16) { *(.data .data.*) } .bss (NOLOAD) : ALIGN(16) { __bss_start = .; *(.bss .bss.*) *(COMMON) . = ALIGN(16); __bss_end = .; } /* 64 KiB of stack, growing down from __stack_top. */ .stack (NOLOAD) : ALIGN(4096) { . += 0x10000; __stack_top = .; } __kernel_end = .; /DISCARD/ : { *(.comment) *(.eh_frame*) *(.note*) } }