diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/kernel/linker.ld | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/kernel/linker.ld b/src/kernel/linker.ld new file mode 100644 index 0000000..650ecd7 --- /dev/null +++ b/src/kernel/linker.ld @@ -0,0 +1,30 @@ +ENTRY(_start) + +SECTIONS +{ + . = 1M; + .text BLOCK(4K) : ALIGN(4K) + { + *(.multiboot) + *(.text) + } + .rodata BLOCK(4K) : ALIGN(4K) + { + *(.rodata) + } + .data BLOCK(4K) : ALIGN(4K) + { + *(.data) + } + _data_end = .; + .bss BLOCK(4K) : ALIGN(4K) + { + *(COMMON) + *(.bss) + + stack_bottom = .; + . += 16K; + stack_top = .; + } + _bss_end = (. + 0xFFF) & ~0xFFF; /* aligned to 4K */ +} |