crosvm/tools/examples/baremetal/layout.ld
Anton Romanov a4cb63d7ce crosvm: add example rust baremetal app that can be booted with crosvm
BUG=none
TEST=`cargo run`

Change-Id: I97eb56eec0d08c67e62755ef21b5ac0cd3e9a461
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3638965
Tested-by: kokoro <noreply+kokoro@google.com>
Auto-Submit: Anton Romanov <romanton@google.com>
Commit-Queue: Anton Romanov <romanton@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-05-10 23:36:47 +00:00

32 lines
453 B
Text

ENTRY(_start)
/* Crosvm will load our code into 0x200000 + paddr */
MEMORY {
VMA : ORIGIN = 0x00200000, LENGTH = 0x200000
RAM : ORIGIN = 0x00000000, LENGTH = 0x200000
}
SECTIONS {
.bootloader :
{
_stack_end = . ;
*(.boot)
}> VMA AT>RAM
.kernel :
{
KEEP(*(.text.main))
*(.text .text.*)
*(.rodata .rodata.*)
*(.data .data.*)
*(.bss .bss.*)
}> VMA AT>RAM
DISCARD/ :
{
*(.note.gnu.*)
}
}