summaryrefslogtreecommitdiff
path: root/src/kernel.lds
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2018-01-23 21:24:31 +0100
committerRichard Braun <rbraun@sceen.net>2018-01-23 21:26:31 +0100
commit4778a84feb6c53e08fd2f15e33f2d1df64c0737f (patch)
tree7841ca102a5c041b5dd7e448e36af7065d81ed2d /src/kernel.lds
parent06844a6997166e5845b4ef7dfbccf5aac3a6a352 (diff)
Port to QEMU netduino2 (cortex-m3)
Diffstat (limited to 'src/kernel.lds')
-rw-r--r--src/kernel.lds26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/kernel.lds b/src/kernel.lds
index f4f209a..3872a87 100644
--- a/src/kernel.lds
+++ b/src/kernel.lds
@@ -29,7 +29,8 @@ ENTRY(boot_start)
*/
MEMORY
{
- RAM : ORIGIN = 1M, LENGTH = 63M
+ FLASH : ORIGIN = 0x0, LENGTH = 0x100000
+ RAM : ORIGIN = 0x20000000, LENGTH = 0x20000
}
/*
@@ -50,7 +51,7 @@ MEMORY
*/
PHDRS
{
- hdr PT_LOAD FLAGS(4);
+ vectors PT_LOAD FLAGS(5);
text PT_LOAD FLAGS(5);
data PT_LOAD FLAGS(6);
}
@@ -84,22 +85,28 @@ PHDRS
*/
SECTIONS
{
- .hdr : {
- *(.hdr)
- } > RAM : hdr
+ .vectors : {
+ *(.vectors)
+ } > FLASH : vectors
.text : {
*(.text*)
- } > RAM : text
+ *(.rodata*)
+ } > FLASH : text
+
+ _lma_data_addr = .;
.data : {
- *(.rodata*)
+ _data_start = .;
*(.data*)
- } > RAM : data
+ _data_end = .;
+ } > RAM AT > FLASH : data
.bss : {
+ _bss_start = .;
*(.bss)
- } > RAM : data
+ _bss_end = .;
+ } > RAM AT > FLASH : data
/*
* The .eh_frame section is used by DWARF tools to unwind the stack,
@@ -109,5 +116,6 @@ SECTIONS
*/
/DISCARD/ : {
*(.eh_frame)
+ *(.ARM*)
}
}