Boots under QEMU on all three ISAs from one clang build: - shared C core (kmain, console) calls a small per-arch contract (arch.h) - per-arch asm entry + trap/vector table + UART driver - parallel Makefile (make -j), 'make run-<arch>', 'make sizes' M1 = boot, UART up, trap vector installed, banner from kmain().
19 lines
401 B
Text
19 lines
401 B
Text
/* link.ld (i386) — multiboot kernels load at 1 MiB. The multiboot
|
|
* header must appear within the first 8 KiB, so put it first. */
|
|
OUTPUT_FORMAT(elf32-i386)
|
|
ENTRY(_start)
|
|
|
|
SECTIONS
|
|
{
|
|
. = 0x00100000; /* 1 MiB */
|
|
|
|
.text : {
|
|
*(.multiboot)
|
|
KEEP(*(.text.boot))
|
|
*(.text .text.*)
|
|
}
|
|
|
|
.rodata : { *(.rodata .rodata.*) }
|
|
.data : { *(.data .data.*) }
|
|
.bss : { *(.bss .bss.*) *(COMMON) }
|
|
}
|