diff options
Diffstat (limited to 'src/threads/kernel.lds.S')
| -rw-r--r-- | src/threads/kernel.lds.S | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/threads/kernel.lds.S b/src/threads/kernel.lds.S new file mode 100644 index 0000000..6154d08 --- /dev/null +++ b/src/threads/kernel.lds.S @@ -0,0 +1,26 @@ +#include "threads/loader.h" + +OUTPUT_FORMAT("elf32-i386") +OUTPUT_ARCH("i386") +ENTRY(start) /* Kernel starts at "start" symbol. */ +SECTIONS +{ + /* Specifies the virtual address for the kernel base. */ + . = LOADER_PHYS_BASE + LOADER_KERN_BASE; + + _start = .; + + /* Kernel starts with code, followed by read-only data and writable data. */ + .text : { *(.start) *(.text) } = 0x90 + .rodata : { *(.rodata) *(.rodata.*) + . = ALIGN(0x1000); + _end_kernel_text = .; } + .data : { *(.data) } + + /* BSS (zero-initialized data) is after everything else. */ + _start_bss = .; + .bss : { *(.bss) } + _end_bss = .; + + _end = .; +} |
