diff options
Diffstat (limited to 'userspace/sys/linker.ld')
| -rw-r--r-- | userspace/sys/linker.ld | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/userspace/sys/linker.ld b/userspace/sys/linker.ld new file mode 100644 index 0000000..7c1c4bf --- /dev/null +++ b/userspace/sys/linker.ld @@ -0,0 +1,37 @@ +ENTRY(_start) + +SECTIONS +{ + . = 1M; + + kernel_start = .; + + .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) + *(.bootstrap_stack) + } + + kernel_end = .; + +} |
