diff options
author | Marvin Borner | 2019-09-14 17:05:06 +0200 |
---|---|---|
committer | Marvin Borner | 2019-09-14 17:05:06 +0200 |
commit | 36bbfd9184426576d38841bcabfa5ba2b59f726c (patch) | |
tree | 5f21ffd8181bdaf873fb0ed0787784392c2f8af6 /src/linker.ld | |
parent | 119d15393abe1bd0d31e7c9864799063b9b5dc28 (diff) |
Added very basic kernel and vga driver
Diffstat (limited to 'src/linker.ld')
-rw-r--r-- | src/linker.ld | 35 |
1 files changed, 35 insertions, 0 deletions
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 |