From 36bbfd9184426576d38841bcabfa5ba2b59f726c Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 14 Sep 2019 17:05:06 +0200 Subject: Added very basic kernel and vga driver --- src/linker.ld | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/linker.ld (limited to 'src/linker.ld') diff --git a/src/linker.ld b/src/linker.ld new file mode 100644 index 0000000..10315a5 --- /dev/null +++ b/src/linker.ld @@ -0,0 +1,35 @@ +/* Specify entry for bootloader */ +ENTRY(_start) + +/* Specify position of object files in kernel image */ +SECTIONS +{ + /* Start at 1MiB */ + . = 1M; + + /* First multiboot header then text section */ + .text BLOCK(4K) : ALIGN(4K) + { + *(.multiboot) + *(.text) + } + + /* Read-only data */ + .rodata BLOCK(4K) : ALIGN(4K) + { + *(.rodata) + } + + /* Read-write data (initialized) */ + .data BLOCK(4K) : ALIGN(4K) + { + *(.data) + } + + /* Read-write data (uninitialized) and stack */ + .bss BLOCK(4K) : ALIGN(4K) + { + *(COMMON) + *(.bss) + } +} \ No newline at end of file -- cgit v1.2.3