diff --git a/tools/examples/baremetal/layout.ld b/tools/examples/baremetal/layout.ld index d9529c0e9b..7d8060d3c0 100644 --- a/tools/examples/baremetal/layout.ld +++ b/tools/examples/baremetal/layout.ld @@ -3,7 +3,6 @@ ENTRY(_start) /* Crosvm will load our code into 0x200000 + paddr */ MEMORY { VMA : ORIGIN = 0x00200000, LENGTH = 0x200000 - RAM : ORIGIN = 0x00000000, LENGTH = 0x200000 } SECTIONS { @@ -13,7 +12,7 @@ SECTIONS { { _stack_end = . ; *(.boot) - }> VMA AT>RAM + }> VMA .kernel : { @@ -22,7 +21,7 @@ SECTIONS { *(.rodata .rodata.*) *(.data .data.*) *(.bss .bss.*) - }> VMA AT>RAM + }> VMA DISCARD/ : { diff --git a/tools/examples/baremetal/src/boot.asm b/tools/examples/baremetal/src/boot.asm index d3e25922d1..861192c03a 100644 --- a/tools/examples/baremetal/src/boot.asm +++ b/tools/examples/baremetal/src/boot.asm @@ -1,12 +1,13 @@ +/* Copyright 2022 The ChromiumOS Authors. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + .section .boot, "awx" .global _start .code64 -# crosvm starts execution at 0x200 offset from the beginning -.fill 0x200 _start: lea rsp, _stack_end jmp main - -