aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv/riscv-link.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/riscv/riscv-link.S')
-rw-r--r--arch/riscv/riscv-link.S20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/riscv/riscv-link.S b/arch/riscv/riscv-link.S
new file mode 100644
index 0000000..ffdf590
--- /dev/null
+++ b/arch/riscv/riscv-link.S
@@ -0,0 +1,20 @@
+#include <vmap.h>
+
+OUTPUT_ARCH(riscv)
+ENTRY(_start)
+
+SECTIONS {
+ . = 0; /* no offset */
+ .init : {
+ *(.init.start);
+ *(.init.text);
+ *(.init.data);
+ . = ALIGN(4K);
+ }
+
+ .text ALIGN(VM_KERN) : AT(ADDR(.init) + SIZEOF(.init)) {
+ *(.init.start);
+ *(.text.start);
+ *(.text);
+ }
+}