summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2012-12-10 21:08:02 +0100
committerSylvain Munaut <tnt@246tNt.com>2013-01-02 20:44:11 +0100
commitf853f92e4712a629ccaa5e79b97aa9340d8d9123 (patch)
tree34011fb6a1d7b596470f794ddf4f8f64b3403354
parentadfc622cc1bbfeaa098b61862a953fef13b6e00c (diff)
fw: Fix link scripts to represent reality more accurately
Previously they were hacks to allow build ... Not needed now. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rw-r--r--src/target/firmware/board/compal/highram.lds27
-rw-r--r--src/target/firmware/board/compal/ram.lds6
2 files changed, 16 insertions, 17 deletions
diff --git a/src/target/firmware/board/compal/highram.lds b/src/target/firmware/board/compal/highram.lds
index 498a2fa..482c4c2 100644
--- a/src/target/firmware/board/compal/highram.lds
+++ b/src/target/firmware/board/compal/highram.lds
@@ -6,7 +6,6 @@
* address.
*
* This is used for debugging the loader and for general hacking purposes.
- *
*/
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm)
@@ -14,11 +13,11 @@ ENTRY(_start)
MEMORY
{
/* lowram: could be anything, we place exception vectors here */
- XRAM (rw) : ORIGIN = 0x00800000, LENGTH = 0x00020000
- /* highram binary: our text, initialized data */
- LRAM (rw) : ORIGIN = 0x00820000, LENGTH = 0x00014000
- /* highram binary: our unitialized data, stacks, heap */
- IRAM (rw) : ORIGIN = 0x00834000, LENGTH = 0x0000c000
+ XRAM (rw) : ORIGIN = 0x00800000, LENGTH = 0x00020000
+ /* highram binary single big zone with all rest of internal SRAM */
+ /* -> our text, initialized data */
+ /* -> our unitialized data, stacks, heap */
+ RAM (rw) : ORIGIN = 0x00820000, LENGTH = 0x00030000
}
SECTIONS
{
@@ -29,7 +28,7 @@ SECTIONS
PROVIDE(_start = .);
KEEP(*(.text.start))
*(.text.start)
- } > LRAM
+ } > RAM
/* exception vectors linked for 0x80001c to 0x800034 */
.text.exceptions 0x80001c : AT (LOADADDR(.text.start) + SIZEOF(.text.start)) {
@@ -50,7 +49,7 @@ SECTIONS
/* gcc voodoo */
*(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)
. = ALIGN(4);
- } > LRAM
+ } > RAM
PROVIDE(_text_start = LOADADDR(.text));
PROVIDE(_text_end = LOADADDR(.text) + SIZEOF(.text));
@@ -62,7 +61,7 @@ SECTIONS
KEEP(*(SORT(.ctors)))
/* end of list */
LONG(0)
- } > LRAM
+ } > RAM
PROVIDE(_ctor_start = LOADADDR(.ctors));
PROVIDE(_ctor_end = LOADADDR(.ctors) + SIZEOF(.ctors));
@@ -74,7 +73,7 @@ SECTIONS
KEEP(*(SORT(.dtors)))
/* end of list */
LONG(0)
- } > LRAM
+ } > RAM
PROVIDE(_dtor_start = LOADADDR(.dtors));
PROVIDE(_dtor_end = LOADADDR(.dtors) + SIZEOF(.dtors));
@@ -82,7 +81,7 @@ SECTIONS
. = ALIGN(4);
.rodata : {
*(.rodata*)
- } > LRAM
+ } > RAM
PROVIDE(_rodata_start = LOADADDR(.rodata));
PROVIDE(_rodata_end = LOADADDR(.rodata) + SIZEOF(.rodata));
@@ -90,7 +89,7 @@ SECTIONS
. = ALIGN(4);
.data : {
*(.data)
- } > LRAM
+ } > RAM
PROVIDE(_data_start = LOADADDR(.data));
PROVIDE(_data_end = LOADADDR(.data) + SIZEOF(.data));
@@ -99,7 +98,7 @@ SECTIONS
.got : {
*(.got)
*(.got.plt) *(.igot.plt) *(.got) *(.igot)
- } > LRAM
+ } > RAM
PROVIDE(_got_start = LOADADDR(.got));
PROVIDE(_got_end = LOADADDR(.got) + SIZEOF(.got));
@@ -108,7 +107,7 @@ SECTIONS
. = ALIGN(4);
__bss_start = .;
*(.bss)
- } > IRAM
+ } > RAM
. = ALIGN(4);
__bss_end = .;
PROVIDE(_bss_start = __bss_start);
diff --git a/src/target/firmware/board/compal/ram.lds b/src/target/firmware/board/compal/ram.lds
index 9503ede..4d3a1e4 100644
--- a/src/target/firmware/board/compal/ram.lds
+++ b/src/target/firmware/board/compal/ram.lds
@@ -3,7 +3,6 @@
*
* This script is tailored specifically to the requirements imposed
* on us by the Compal bootloader.
- *
*/
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm)
@@ -11,9 +10,10 @@ ENTRY(_start)
MEMORY
{
/* compal-loaded binary: our text, initialized data */
- LRAM (rw) : ORIGIN = 0x00800000, LENGTH = 0x00014000
+ /* (only this zone can contain loaded data since loader is 64k limit) */
+ LRAM (rw) : ORIGIN = 0x00800000, LENGTH = 0x00010000
/* compal-loaded binary: our unitialized data, stacks, heap */
- IRAM (rw) : ORIGIN = 0x00814000, LENGTH = 0x0000c000
+ IRAM (rw) : ORIGIN = 0x00810000, LENGTH = 0x00030000
}
SECTIONS
{