summaryrefslogtreecommitdiff
path: root/linker.ld
diff options
context:
space:
mode:
Diffstat (limited to 'linker.ld')
-rw-r--r--linker.ld19
1 files changed, 15 insertions, 4 deletions
diff --git a/linker.ld b/linker.ld
index 52a32ef..92ca00f 100644
--- a/linker.ld
+++ b/linker.ld
@@ -1,24 +1,35 @@
-OUTPUT_FORMAT(binary)
+ENTRY(_start)
SECTIONS
{
- . = 0x100000;
+ . = 2M;
.text BLOCK(4K) : ALIGN(4K)
{
+ *(.multiboot)
*(.text)
}
- .bss BLOCK(4K) : ALIGN(4K)
+ /* Read-only data. */
+ .rodata BLOCK(4K) : ALIGN(4K)
{
- *(.bss)
+ *(.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 = .;
}