diff options
Diffstat (limited to 'src/bootstrap/linker.ld')
-rw-r--r-- | src/bootstrap/linker.ld | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/bootstrap/linker.ld b/src/bootstrap/linker.ld new file mode 100644 index 0000000..10e3f98 --- /dev/null +++ b/src/bootstrap/linker.ld @@ -0,0 +1,31 @@ +ENTRY(_start) + +SECTIONS +{ + . = 0x20000; + _bss_start = .; + .bss BLOCK(4K) : ALIGN(4K) + { + *(COMMON) + *(.bss) + } + _bss_end = .; + + . = 2M; + .text BLOCK(4K) : ALIGN(4K) + { + /* the assert needs to be inside of a section or it'll be a syntax error */ + ASSERT(_bss_end <= 2M, "bss too big, needs to be moved down"); + *(.text.startup) + *(.text) + } + .rodata BLOCK(4K) : ALIGN(4K) + { + *(.rodata) + } + .data BLOCK(4K) : ALIGN(4K) + { + *(.data*) + } + _initrd = .; /* is just appended onto the end of the binary */ +} |