summaryrefslogtreecommitdiff
path: root/kernel/riscv/linker.ld
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/riscv/linker.ld')
-rw-r--r--kernel/riscv/linker.ld13
1 files changed, 13 insertions, 0 deletions
diff --git a/kernel/riscv/linker.ld b/kernel/riscv/linker.ld
index ec51176..6689dce 100644
--- a/kernel/riscv/linker.ld
+++ b/kernel/riscv/linker.ld
@@ -10,6 +10,11 @@ MEMORY
SECTIONS
{
+ .header : {
+ KEEP(*(.header))
+ *(.header)
+ } > ROM
+
.text : {
KEEP(*(.text._start))
KEEP(*(.text.start))
@@ -60,6 +65,11 @@ SECTIONS
__ringbuf_end = .;
} > LOGRAM
+ .image_end (NOLOAD) : {
+ . = ALIGN(4);
+ __image_end = .;
+ } > ROM
+
/DISCARD/ : {
*(.eh_frame)
*(.eh_frame.*)
@@ -71,4 +81,7 @@ SECTIONS
*(.llvm_*)
*(.rela.*)
}
+
+ __image_start = ORIGIN(ROM);
+ __image_size = __image_end - __image_start;
}