summaryrefslogtreecommitdiffstats
path: root/script.ld
diff options
context:
space:
mode:
Diffstat (limited to 'script.ld')
-rw-r--r--script.ld35
1 files changed, 35 insertions, 0 deletions
diff --git a/script.ld b/script.ld
new file mode 100644
index 0000000..e8b0bb1
--- /dev/null
+++ b/script.ld
@@ -0,0 +1,35 @@
+MEMORY
+{
+ rom (rx) : ORIGIN = 0x00080000, LENGTH = 0x00080000
+ ram (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00010000
+}
+
+SECTIONS
+{
+ . = ALIGN(4);
+ .text :
+ {
+ KEEP(*(.vectors .vectors.*))
+ *(.text*)
+ *(.rodata*)
+ } > rom
+
+ . = ALIGN(4);
+ .data :
+ {
+ *(.data*);
+ } > ram AT >rom
+
+ . = ALIGN(4);
+ .bss (NOLOAD) :
+ {
+ __bss_start__ = . ;
+ *(.bss*)
+ *(COMMON)
+ __bss_end__ = . ;
+ } > ram
+
+ _end = . ;
+ __end__ = _end ;
+ end = _end;
+}