summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2011-01-24 22:10:45 +0100
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2011-01-24 22:10:45 +0100
commit250095c7bc783f415b3958b1099216e8953600e7 (patch)
treee649e72f7a9659c1abe7121ef957f15c1aa49610 /arch
parenteee119de6a2bd0487e91daf69e7962351e2a3c9c (diff)
The heap needs to be anonymous; adding generic __heap_start and __heap_end symbols. Also marking the beginning and the end of the rom-to-ram sections.
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/lpc17xx/ldscript15
-rw-r--r--arch/arm/lpc17xx/ldscript-mpu18
2 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm/lpc17xx/ldscript b/arch/arm/lpc17xx/ldscript
index 0f8fe23..422fe72 100644
--- a/arch/arm/lpc17xx/ldscript
+++ b/arch/arm/lpc17xx/ldscript
@@ -43,6 +43,9 @@ PROVIDE(__cs3_stack_size = __cs3_region_start_ram + __cs3_region_size_ram - _end
PROVIDE(__cs3_heap_start = _end);
PROVIDE(__cs3_heap_end = __cs3_region_start_ram + __cs3_region_size_ram);
+PROVIDE(__heap_start = __cs3_heap_start);
+PROVIDE(__heap_end = __cs3_heap_end);
+
SECTIONS
{
.text :
@@ -133,6 +136,12 @@ SECTIONS
__cs3_region_size_rom = LENGTH(rom);
__cs3_region_num = 1;
+ .data_begin :
+ {
+ . = ALIGN(8);
+ __rom_data_begin = .;
+ } > rom
+
.data :
{
__cs3_region_start_ram = .;
@@ -155,6 +164,12 @@ SECTIONS
_end = .;
__end = .;
} >ram AT>rom
+ .data_end :
+ {
+ . = ALIGN(8);
+ __rom_data_end = .;
+ } > rom
+
/* This used for USB RAM section */
.usb_ram (NOLOAD):
{
diff --git a/arch/arm/lpc17xx/ldscript-mpu b/arch/arm/lpc17xx/ldscript-mpu
index 3af58a9..df8551c 100644
--- a/arch/arm/lpc17xx/ldscript-mpu
+++ b/arch/arm/lpc17xx/ldscript-mpu
@@ -43,6 +43,11 @@ PROVIDE(__cs3_stack_size = __cs3_region_start_ram + __cs3_region_size_ram - _end
PROVIDE(__cs3_heap_start = _end);
PROVIDE(__cs3_heap_end = __cs3_region_start_ram + __cs3_region_size_ram);
+PROVIDE(__rom_data_len = __rom_data_end - __rom_data_begin);
+
+PROVIDE(__heap_start = __cs3_heap_start);
+PROVIDE(__heap_end = __cs3_heap_end);
+
SECTIONS
{
.text :
@@ -147,10 +152,17 @@ SECTIONS
} >rom
__cs3_region_size_rom = LENGTH(rom);
__cs3_region_num = 1;
+
+ .data_begin :
+ {
+ . = ALIGN(8);
+ __rom_data_begin = .;
+ } > rom
.data :
{
__cs3_region_start_ram = .;
+ __ram_data_begin = .;
__privileged_data_start__ = .;
*( privileged_data )
__privileged_data_end___len = . - __privileged_data_start__ - 1 ;
@@ -181,6 +193,12 @@ SECTIONS
_end = .;
__end = .;
} >ram AT>rom
+ .data_end :
+ {
+ . = ALIGN(8);
+ __rom_data_end = .;
+ } > rom
+
/* This used for USB RAM section */
.usb_ram (NOLOAD):
{