mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-06 10:32:10 +00:00
Fix loading of the example baremetal kernel with the fixed ELF kernel loader: - Remove the "RAM" address space so virtual and physical address match. - Remove the 0x200-byte padding now that entry point address is used. BUG=b:234155022 TEST=Run baremetal as in tools/examples/baremetal/README.md Change-Id: I61394cdf4bf71f91736da5a636b0088ecfe78c84 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3691965 Commit-Queue: Daniel Verkamp <dverkamp@chromium.org> Reviewed-by: Anton Romanov <romanton@google.com> Reviewed-by: Alexandre Courbot <acourbot@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com>
31 lines
390 B
Text
31 lines
390 B
Text
ENTRY(_start)
|
|
|
|
/* Crosvm will load our code into 0x200000 + paddr */
|
|
MEMORY {
|
|
VMA : ORIGIN = 0x00200000, LENGTH = 0x200000
|
|
}
|
|
|
|
SECTIONS {
|
|
|
|
|
|
.bootloader :
|
|
{
|
|
_stack_end = . ;
|
|
*(.boot)
|
|
}> VMA
|
|
|
|
.kernel :
|
|
{
|
|
KEEP(*(.text.main))
|
|
*(.text .text.*)
|
|
*(.rodata .rodata.*)
|
|
*(.data .data.*)
|
|
*(.bss .bss.*)
|
|
}> VMA
|
|
|
|
DISCARD/ :
|
|
{
|
|
*(.note.gnu.*)
|
|
}
|
|
|
|
}
|