summaryrefslogtreecommitdiff
path: root/linker.ld
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2015-05-12 22:22:06 +0200
committerMichal Idziorek <m.i@gmx.at>2015-05-12 22:22:06 +0200
commit2c1148e7920cf1d4c772d0d81757a7f8d736648e (patch)
treeeed84fead5fae2efb3526094eed05eeae127f915 /linker.ld
parent0a9f1b1fb19ea7e0c54c884b7ae8c709ea738d1f (diff)
migrating to grub and elf kernel format
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 = .;
}