[PATCH 3/7] bsps: Add RamEnd to linker command files

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Dec 16 12:42:08 UTC 2019


Update #3838.
---
 bsps/arm/shared/start/linkcmds.base              | 1 +
 bsps/bfin/TLL6527M/start/linkcmds                | 1 +
 bsps/bfin/bf537Stamp/start/linkcmds              | 1 +
 bsps/bfin/eZKit533/start/linkcmds                | 1 +
 bsps/epiphany/epiphany_sim/start/linkcmds        | 1 +
 bsps/i386/pc386/start/linkcmds                   | 1 +
 bsps/lm32/lm32_evr/start/linkcmds                | 1 +
 bsps/lm32/milkymist/start/linkcmds               | 1 +
 bsps/m68k/av5282/start/linkcmds                  | 1 +
 bsps/m68k/av5282/start/linkcmdsflash             | 1 +
 bsps/m68k/av5282/start/linkcmdsram               | 1 +
 bsps/m68k/csb360/start/linkcmds                  | 1 +
 bsps/m68k/gen68340/start/linkcmds                | 1 +
 bsps/m68k/gen68360/start/linkcmds                | 1 +
 bsps/m68k/gen68360/start/linkcmds.bootp          | 1 +
 bsps/m68k/gen68360/start/linkcmds.prom           | 1 +
 bsps/m68k/mcf5206elite/start/linkcmds            | 1 +
 bsps/m68k/mcf52235/start/linkcmds                | 1 +
 bsps/m68k/mcf5225x/start/linkcmds                | 1 +
 bsps/m68k/mcf5235/start/linkcmds                 | 1 +
 bsps/m68k/mcf5235/start/linkcmdsflash            | 1 +
 bsps/m68k/mcf5235/start/linkcmdsram              | 1 +
 bsps/m68k/mcf5329/start/linkcmds                 | 1 +
 bsps/m68k/mcf5329/start/linkcmdsflash            | 1 +
 bsps/m68k/mrm332/start/linkcmds                  | 2 +-
 bsps/m68k/mvme162/start/linkcmds                 | 1 +
 bsps/m68k/mvme167/start/linkcmds                 | 1 +
 bsps/m68k/shared/start/linkcmds.base             | 1 +
 bsps/m68k/uC5282/start/linkcmds                  | 1 +
 bsps/mips/csb350/start/linkcmds                  | 1 +
 bsps/mips/hurricane/start/linkcmds               | 1 +
 bsps/mips/jmr3904/start/linkcmds                 | 1 +
 bsps/mips/malta/start/linkcmds                   | 1 +
 bsps/mips/rbtx4925/start/linkcmds                | 1 +
 bsps/mips/rbtx4938/start/linkcmds                | 1 +
 bsps/moxie/moxiesim/start/linkcmds               | 1 +
 bsps/nios2/nios2_iss/start/linkcmds              | 1 +
 bsps/or1k/shared/start/linkcmds.base             | 1 +
 bsps/powerpc/gen5200/start/linkcmds.gen5200_base | 1 +
 bsps/powerpc/haleakala/start/linkcmds            | 1 +
 bsps/powerpc/mpc8260ads/start/linkcmds           | 1 +
 bsps/powerpc/shared/start/linkcmds.base          | 1 +
 bsps/powerpc/ss555/start/linkcmds                | 1 +
 bsps/powerpc/virtex4/start/linkcmds              | 1 +
 bsps/powerpc/virtex5/start/linkcmds              | 1 +
 bsps/riscv/shared/start/linkcmds.base.in         | 1 +
 bsps/sh/gensh1/start/linkcmds                    | 1 +
 bsps/sh/gensh2/start/linkcmds                    | 1 +
 bsps/sh/gensh2/start/linkcmds.ram                | 1 +
 bsps/sh/gensh2/start/linkcmds.rom                | 1 +
 bsps/sh/gensh4/start/linkcmds                    | 1 +
 bsps/sh/gensh4/start/linkcmds.rom                | 1 +
 bsps/sh/gensh4/start/linkcmds.rom2ram            | 1 +
 bsps/sh/shsim/start/linkcmds                     | 1 +
 bsps/sparc64/shared/start/linkcmds               | 1 +
 bsps/v850/gdbv850sim/start/linkcmds              | 1 +
 bsps/x86_64/amd64/start/linkcmds                 | 1 +
 57 files changed, 57 insertions(+), 1 deletion(-)

diff --git a/bsps/arm/shared/start/linkcmds.base b/bsps/arm/shared/start/linkcmds.base
index fb819e2bb1..8121161e0c 100644
--- a/bsps/arm/shared/start/linkcmds.base
+++ b/bsps/arm/shared/start/linkcmds.base
@@ -359,6 +359,7 @@ SECTIONS {
 	/* FIXME */
 	RamBase = ORIGIN (REGION_WORK);
 	RamSize = LENGTH (REGION_WORK);
+	RamEnd = RamBase + RamSize;
 	WorkAreaBase = bsp_section_work_begin;
 	HeapSize = 0;
 
diff --git a/bsps/bfin/TLL6527M/start/linkcmds b/bsps/bfin/TLL6527M/start/linkcmds
index 17b9e244ca..0afd7fc47a 100644
--- a/bsps/bfin/TLL6527M/start/linkcmds
+++ b/bsps/bfin/TLL6527M/start/linkcmds
@@ -10,6 +10,7 @@ STARTUP(start.o)
  */
 _RamBase    = DEFINED(_RamBase)   ? _RamBase : 0x0;
 _RamSize    = DEFINED(_RamSize)   ? _RamSize : 0x04000000;
+_RamEnd     = _RamBase + _RamSize;
 _HeapSize   = DEFINED(_HeapSize)  ? _HeapSize : 0x10000;
 
 MEMORY
diff --git a/bsps/bfin/bf537Stamp/start/linkcmds b/bsps/bfin/bf537Stamp/start/linkcmds
index 1492da027a..5d2635d1f6 100644
--- a/bsps/bfin/bf537Stamp/start/linkcmds
+++ b/bsps/bfin/bf537Stamp/start/linkcmds
@@ -14,6 +14,7 @@ _RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
    along with banks for io and flash, so waste some RAM at the end
    to free up mmu entries. */
 _RamSize = DEFINED(_RamSize) ? _RamSize : 0x03400000;
+_RamEnd = _RamBase + _RamSize;
 _HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
 
 MEMORY
diff --git a/bsps/bfin/eZKit533/start/linkcmds b/bsps/bfin/eZKit533/start/linkcmds
index 90451bd46a..bd2f4d79de 100644
--- a/bsps/bfin/eZKit533/start/linkcmds
+++ b/bsps/bfin/eZKit533/start/linkcmds
@@ -10,6 +10,7 @@ STARTUP(start.o)
  */
 _RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
 _RamSize = DEFINED(_RamSize) ? _RamSize : 0x01000000;
+_RamEnd = _RamBase + _RamSize;
 _HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
 
 MEMORY
diff --git a/bsps/epiphany/epiphany_sim/start/linkcmds b/bsps/epiphany/epiphany_sim/start/linkcmds
index 05e500e7d7..8ef1b5b89b 100644
--- a/bsps/epiphany/epiphany_sim/start/linkcmds
+++ b/bsps/epiphany/epiphany_sim/start/linkcmds
@@ -367,6 +367,7 @@ SECTIONS {
 
   RamBase = ORIGIN (REGION_WORK);
   RamSize = LENGTH (REGION_WORK);
+  RamEnd = RamBase + RamSize;
   WorkAreaBase = bsp_section_work_begin;
   HeapSize = 0;
 }
diff --git a/bsps/i386/pc386/start/linkcmds b/bsps/i386/pc386/start/linkcmds
index 01ec1e9371..8faa69d993 100644
--- a/bsps/i386/pc386/start/linkcmds
+++ b/bsps/i386/pc386/start/linkcmds
@@ -20,6 +20,7 @@ HeapSize = DEFINED(HeapSize) ? HeapSize :
           DEFINED(_HeapSize) ? _HeapSize : 0x0;
 RamSize = DEFINED(RamSize) ? RamSize    : 
           DEFINED(_RamSize) ? _RamSize : 0xFFFFFFFF;
+RamEnd = RamBase + RamSize;
 
 SECTIONS
 {
diff --git a/bsps/lm32/lm32_evr/start/linkcmds b/bsps/lm32/lm32_evr/start/linkcmds
index c89940dd1c..a4b204d5eb 100644
--- a/bsps/lm32/lm32_evr/start/linkcmds
+++ b/bsps/lm32/lm32_evr/start/linkcmds
@@ -11,6 +11,7 @@ STARTUP(start.o)
  */
 RamBase = DEFINED(RamBase) ? RamBase : 0x08000000;
 RamSize = DEFINED(RamSize) ? RamSize : 32M;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(HeapSize) ? HeapSize : 2M;
 
 MEMORY {
diff --git a/bsps/lm32/milkymist/start/linkcmds b/bsps/lm32/milkymist/start/linkcmds
index 28779a80a8..c5ca1751cf 100644
--- a/bsps/lm32/milkymist/start/linkcmds
+++ b/bsps/lm32/milkymist/start/linkcmds
@@ -11,6 +11,7 @@ STARTUP(start.o)
  */
 RamBase = DEFINED(RamBase) ? RamBase : 0x40000000;
 RamSize = DEFINED(RamSize) ? RamSize : 128M;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(HeapSize) ? HeapSize : 92M;
 
 MEMORY {
diff --git a/bsps/m68k/av5282/start/linkcmds b/bsps/m68k/av5282/start/linkcmds
index bf05d62018..4ffee0fa91 100644
--- a/bsps/m68k/av5282/start/linkcmds
+++ b/bsps/m68k/av5282/start/linkcmds
@@ -15,6 +15,7 @@
  */
 RamBase = DEFINED(RamBase) ? RamBase : 0x0;
 RamSize = DEFINED(RamSize) ? RamSize : 16M;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(HeapSize) ? HeapSize : 0;
 _VBR = 0x0;
 
diff --git a/bsps/m68k/av5282/start/linkcmdsflash b/bsps/m68k/av5282/start/linkcmdsflash
index be694788dd..1307d844c9 100644
--- a/bsps/m68k/av5282/start/linkcmdsflash
+++ b/bsps/m68k/av5282/start/linkcmdsflash
@@ -15,6 +15,7 @@
  */
 RamBase = DEFINED(RamBase) ? RamBase : 0x0;
 RamSize = DEFINED(RamSize) ? RamSize : 16M;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(HeapSize) ? HeapSize : 0;
 _VBR = 0x0;
 
diff --git a/bsps/m68k/av5282/start/linkcmdsram b/bsps/m68k/av5282/start/linkcmdsram
index bb678af188..7ec8edb6e9 100644
--- a/bsps/m68k/av5282/start/linkcmdsram
+++ b/bsps/m68k/av5282/start/linkcmdsram
@@ -15,6 +15,7 @@
  */
 RamBase = DEFINED(RamBase) ? RamBase : 0x0;
 RamSize = DEFINED(RamSize) ? RamSize : 16M;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(HeapSize) ? HeapSize : 0;
 _VBR = 0x0;
 
diff --git a/bsps/m68k/csb360/start/linkcmds b/bsps/m68k/csb360/start/linkcmds
index 25f3f3f15a..f7b2a98698 100644
--- a/bsps/m68k/csb360/start/linkcmds
+++ b/bsps/m68k/csb360/start/linkcmds
@@ -14,6 +14,7 @@
 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
 RamBase = DEFINED(RamBase) ? RamBase : 0x00100000;
 RamSize = DEFINED(RamSize) ? RamSize : 31M;
+RamEnd = RamBase + RamSize;
 
 /* This is needed for _CPU_ISR_install_vector - 
 *  WARNING: it MUST match BSP_RAMBAR !!!!!!!!!!! */
diff --git a/bsps/m68k/gen68340/start/linkcmds b/bsps/m68k/gen68340/start/linkcmds
index 3621474fe8..83a033a96f 100644
--- a/bsps/m68k/gen68340/start/linkcmds
+++ b/bsps/m68k/gen68340/start/linkcmds
@@ -20,6 +20,7 @@
  */
 RamBase = DEFINED(RamBase) ? RamBase : 0x10000000;
 RamSize = DEFINED(RamSize) ? RamSize : 4M;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
 
 /*
diff --git a/bsps/m68k/gen68360/start/linkcmds b/bsps/m68k/gen68360/start/linkcmds
index f2858137d7..0bbb3940e3 100644
--- a/bsps/m68k/gen68360/start/linkcmds
+++ b/bsps/m68k/gen68360/start/linkcmds
@@ -15,6 +15,7 @@
  */
 RamBase = DEFINED(RamBase) ? RamBase : 0x0;
 RamSize = DEFINED(RamSize) ? RamSize : 64M;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
 
 /*
diff --git a/bsps/m68k/gen68360/start/linkcmds.bootp b/bsps/m68k/gen68360/start/linkcmds.bootp
index a05573cb2c..2c1814aa5d 100644
--- a/bsps/m68k/gen68360/start/linkcmds.bootp
+++ b/bsps/m68k/gen68360/start/linkcmds.bootp
@@ -19,6 +19,7 @@
  */
 RamBase = DEFINED(RamBase) ? RamBase : 0x0;
 RamSize = DEFINED(RamSize) ? RamSize : 64M;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
 
 /*
diff --git a/bsps/m68k/gen68360/start/linkcmds.prom b/bsps/m68k/gen68360/start/linkcmds.prom
index 0e68300de7..64aad46cc7 100644
--- a/bsps/m68k/gen68360/start/linkcmds.prom
+++ b/bsps/m68k/gen68360/start/linkcmds.prom
@@ -19,6 +19,7 @@
  */
 RamBase = DEFINED(RamBase) ? RamBase : 0x0;
 RamSize = DEFINED(RamSize) ? RamSize : 64M;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
 
 /*
diff --git a/bsps/m68k/mcf5206elite/start/linkcmds b/bsps/m68k/mcf5206elite/start/linkcmds
index d65e495943..ebabe5f5f7 100644
--- a/bsps/m68k/mcf5206elite/start/linkcmds
+++ b/bsps/m68k/mcf5206elite/start/linkcmds
@@ -39,6 +39,7 @@ _SYS_CLOCK_FREQUENCY = DEFINED(_SYS_CLOCK_FREQUENCY) ?
 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
 RamBase = DEFINED(RamBase) ? RamBase : 0x30000000;
 RamSize = DEFINED(RamSize) ? RamSize : 0x00100000;
+RamEnd = RamBase + RamSize;
 
 /*
  * Setup the memory map of the MCF5206eLITE evaluation board
diff --git a/bsps/m68k/mcf52235/start/linkcmds b/bsps/m68k/mcf52235/start/linkcmds
index 0c4d15fe08..a5c69b2074 100644
--- a/bsps/m68k/mcf52235/start/linkcmds
+++ b/bsps/m68k/mcf52235/start/linkcmds
@@ -15,6 +15,7 @@
  */
 RamBase = DEFINED(RamBase) ? RamBase : 0x20000000;
 RamSize = DEFINED(RamSize) ? RamSize : 32K;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
 _FlashBase = DEFINED(_FlashBase) ? _FlashBase : 0x00000000;
 
diff --git a/bsps/m68k/mcf5225x/start/linkcmds b/bsps/m68k/mcf5225x/start/linkcmds
index 563aede8eb..0cd45553ba 100644
--- a/bsps/m68k/mcf5225x/start/linkcmds
+++ b/bsps/m68k/mcf5225x/start/linkcmds
@@ -15,6 +15,7 @@
  */
 RamBase = DEFINED(RamBase) ? RamBase : 0x20000000;
 RamSize = DEFINED(RamSize) ? RamSize : 64K;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
 _FlashBase = DEFINED(_FlashBase) ? _FlashBase : 0x00000000;
 
diff --git a/bsps/m68k/mcf5235/start/linkcmds b/bsps/m68k/mcf5235/start/linkcmds
index 8d98973a28..a1ecc35387 100644
--- a/bsps/m68k/mcf5235/start/linkcmds
+++ b/bsps/m68k/mcf5235/start/linkcmds
@@ -22,6 +22,7 @@ MCF5235_BSP_START_FROM_FLASH = 0;
  */
 RamBase = DEFINED(RamBase) ? RamBase : 0x0;
 RamSize = DEFINED(RamSize) ? RamSize : 16M;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(HeapSize) ? HeapSize : 0;
 
 
diff --git a/bsps/m68k/mcf5235/start/linkcmdsflash b/bsps/m68k/mcf5235/start/linkcmdsflash
index 87dfadf8c0..c644b34fde 100644
--- a/bsps/m68k/mcf5235/start/linkcmdsflash
+++ b/bsps/m68k/mcf5235/start/linkcmdsflash
@@ -22,6 +22,7 @@ MCF5235_BSP_START_FROM_FLASH = 1;
  */
 RamBase = DEFINED(RamBase) ? RamBase : 0x0;
 RamSize = DEFINED(RamSize) ? RamSize : 16M;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(HeapSize) ? HeapSize : 0;
 
 
diff --git a/bsps/m68k/mcf5235/start/linkcmdsram b/bsps/m68k/mcf5235/start/linkcmdsram
index 0f616890a8..ae15b92067 100644
--- a/bsps/m68k/mcf5235/start/linkcmdsram
+++ b/bsps/m68k/mcf5235/start/linkcmdsram
@@ -22,6 +22,7 @@ MCF5235_BSP_START_FROM_FLASH = 0;
  */
 RamBase = DEFINED(RamBase) ? RamBase : 0x0;
 RamSize = DEFINED(RamSize) ? RamSize : 16M;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(HeapSize) ? HeapSize : 0;
 
 
diff --git a/bsps/m68k/mcf5329/start/linkcmds b/bsps/m68k/mcf5329/start/linkcmds
index 78fc50c22a..54fa5b34bb 100644
--- a/bsps/m68k/mcf5329/start/linkcmds
+++ b/bsps/m68k/mcf5329/start/linkcmds
@@ -18,6 +18,7 @@ _CoreSRamSize = DEFINED(RamSize) ? RamSize : 32K;
 
 RamBase = DEFINED(RamBase) ? RamBase : 0x40000000;
 RamSize = DEFINED(RamSize) ? RamSize : 32M;
+RamEnd = RamBase + RamSize;
 
 _BootFlashBase = DEFINED(_FlashBase) ? _FlashBase : 0x00000000;
 _BootFlashSize = DEFINED(_FlashBase) ? _FlashBase : 2M;
diff --git a/bsps/m68k/mcf5329/start/linkcmdsflash b/bsps/m68k/mcf5329/start/linkcmdsflash
index adfb3bacfb..99e04d3310 100644
--- a/bsps/m68k/mcf5329/start/linkcmdsflash
+++ b/bsps/m68k/mcf5329/start/linkcmdsflash
@@ -18,6 +18,7 @@ _CoreSRamSize = DEFINED(RamSize) ? RamSize : 32K;
 
 RamBase = DEFINED(RamBase) ? RamBase : 0x40000000;
 RamSize = DEFINED(RamSize) ? RamSize : 32M;
+RamEnd = RamBase + RamSize;
 
 _BootFlashBase = DEFINED(_FlashBase) ? _FlashBase : 0x00000000;
 _BootFlashSize = DEFINED(_FlashBase) ? _FlashBase : 2M;
diff --git a/bsps/m68k/mrm332/start/linkcmds b/bsps/m68k/mrm332/start/linkcmds
index 125538c50c..1ce441652a 100644
--- a/bsps/m68k/mrm332/start/linkcmds
+++ b/bsps/m68k/mrm332/start/linkcmds
@@ -41,7 +41,7 @@ __DYNAMIC  =  0;
 RomBase = DEFINED(RomBase) ? RomBase : 0x90000;
 RamBase = DEFINED(RamBase) ? RamBase : 0x03000;
 RamSize = DEFINED(RamSize) ? RamSize : 0x7d000;
-_RamEnd = RamBase + RamSize;
+RamEnd = RamBase + RamSize;
 
 MEMORY
 {
diff --git a/bsps/m68k/mvme162/start/linkcmds b/bsps/m68k/mvme162/start/linkcmds
index fd77dcf147..26c85007a4 100644
--- a/bsps/m68k/mvme162/start/linkcmds
+++ b/bsps/m68k/mvme162/start/linkcmds
@@ -17,6 +17,7 @@
  */
 
 RamSize = DEFINED(RamSize) ? RamSize : 1M;
+RamEnd = RamBase + RamSize;
 
 MEMORY
 {
diff --git a/bsps/m68k/mvme167/start/linkcmds b/bsps/m68k/mvme167/start/linkcmds
index dc50449b29..145845b28a 100644
--- a/bsps/m68k/mvme167/start/linkcmds
+++ b/bsps/m68k/mvme167/start/linkcmds
@@ -15,6 +15,7 @@
 
 RamBase = DEFINED(RamBase) ? RamBase : 0x00800000;
 RamSize = DEFINED(RamSize) ? RamSize : 4M;
+RamEnd = RamBase + RamSize;
 
 MEMORY
 {
diff --git a/bsps/m68k/shared/start/linkcmds.base b/bsps/m68k/shared/start/linkcmds.base
index fc726b4419..1b6e0ec7d3 100644
--- a/bsps/m68k/shared/start/linkcmds.base
+++ b/bsps/m68k/shared/start/linkcmds.base
@@ -267,6 +267,7 @@ SECTIONS {
 	/* FIXME */
 	RamBase = ORIGIN (REGION_DATA);
 	RamSize = LENGTH (REGION_DATA);
+	RamEnd = RamBase + RamSize;
 	WorkAreaBase = bsp_section_work_begin;
 	HeapSize = 0;
 
diff --git a/bsps/m68k/uC5282/start/linkcmds b/bsps/m68k/uC5282/start/linkcmds
index 9636fc28ca..da97472f1b 100644
--- a/bsps/m68k/uC5282/start/linkcmds
+++ b/bsps/m68k/uC5282/start/linkcmds
@@ -17,6 +17,7 @@
  */
 RamBase = DEFINED(RamBase) ? RamBase : 0x0;
 RamSize = DEFINED(RamSize) ? RamSize : 16M;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(HeapSize) ? HeapSize : 0;
 _FlashBase = DEFINED(_FlashBase) ? _FlashBase : 0x10000000;
 _FlashSize = DEFINED(_FlashSize) ? _FlashSize : 4M ;
diff --git a/bsps/mips/csb350/start/linkcmds b/bsps/mips/csb350/start/linkcmds
index 961ada650e..874cc52d8e 100644
--- a/bsps/mips/csb350/start/linkcmds
+++ b/bsps/mips/csb350/start/linkcmds
@@ -14,6 +14,7 @@ _sdram_size = DEFINED(_sdram_size) ? _sdram_size : 12M;
 /* standard items provided by RTEMS linkcmds files */
 RamBase = _sdram_base;
 RamSize = _sdram_size;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
 
 ENTRY(_start)
diff --git a/bsps/mips/hurricane/start/linkcmds b/bsps/mips/hurricane/start/linkcmds
index 51e47158d3..0a7d9ded29 100644
--- a/bsps/mips/hurricane/start/linkcmds
+++ b/bsps/mips/hurricane/start/linkcmds
@@ -7,6 +7,7 @@
  */
 RamBase = DEFINED(RamBase) ? RamBase : 0x80000000;
 RamSize = DEFINED(RamSize) ? RamSize : 4M;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
 
 ENTRY(start)
diff --git a/bsps/mips/jmr3904/start/linkcmds b/bsps/mips/jmr3904/start/linkcmds
index 0becab1e6f..f81dd1be04 100644
--- a/bsps/mips/jmr3904/start/linkcmds
+++ b/bsps/mips/jmr3904/start/linkcmds
@@ -7,6 +7,7 @@
  */
 RamBase = DEFINED(RamBase) ? RamBase : 0x88000000;
 RamSize = DEFINED(RamSize) ? RamSize : 4M;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
 
 ENTRY(_start)
diff --git a/bsps/mips/malta/start/linkcmds b/bsps/mips/malta/start/linkcmds
index 1d6745cfe1..8002c17234 100644
--- a/bsps/mips/malta/start/linkcmds
+++ b/bsps/mips/malta/start/linkcmds
@@ -7,6 +7,7 @@
  */
 RamBase = DEFINED(RamBase) ? RamBase : 0x80000000;
 RamSize = DEFINED(RamSize) ? RamSize : 128M;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
 
 ENTRY(_start)
diff --git a/bsps/mips/rbtx4925/start/linkcmds b/bsps/mips/rbtx4925/start/linkcmds
index 3042176adf..e78fcb57a0 100644
--- a/bsps/mips/rbtx4925/start/linkcmds
+++ b/bsps/mips/rbtx4925/start/linkcmds
@@ -7,6 +7,7 @@
  */
 RamBase = DEFINED(RamBase) ? RamBase : 0x80000000;
 RamSize = DEFINED(RamSize) ? RamSize : 4M;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
 
 ENTRY(start)
diff --git a/bsps/mips/rbtx4938/start/linkcmds b/bsps/mips/rbtx4938/start/linkcmds
index e11d1dcee2..fae3885dc5 100644
--- a/bsps/mips/rbtx4938/start/linkcmds
+++ b/bsps/mips/rbtx4938/start/linkcmds
@@ -7,6 +7,7 @@
  */
 RamBase = DEFINED(RamBase) ? RamBase : 0x80000000;
 RamSize = DEFINED(RamSize) ? RamSize : 4M;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
 
 ENTRY(start)
diff --git a/bsps/moxie/moxiesim/start/linkcmds b/bsps/moxie/moxiesim/start/linkcmds
index 843512b15d..eaf9d8d3a0 100644
--- a/bsps/moxie/moxiesim/start/linkcmds
+++ b/bsps/moxie/moxiesim/start/linkcmds
@@ -22,6 +22,7 @@ STARTUP(start.o)
 
 RamBase = DEFINED(RamBase) ? RamBase : 0x00000000;
 RamSize = DEFINED(RamSize) ? RamSize : 16M;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
 
 SECTIONS
diff --git a/bsps/nios2/nios2_iss/start/linkcmds b/bsps/nios2/nios2_iss/start/linkcmds
index bcbfeafe1f..ea037ffeb9 100644
--- a/bsps/nios2/nios2_iss/start/linkcmds
+++ b/bsps/nios2/nios2_iss/start/linkcmds
@@ -23,6 +23,7 @@ DO NOT MODIFY THIS FILE
 
 RamBase = DEFINED(RamBase) ? RamBase : 0x00000000;
 RamSize = DEFINED(RamSize) ? RamSize : 0x00800000;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
 
 MEMORY
diff --git a/bsps/or1k/shared/start/linkcmds.base b/bsps/or1k/shared/start/linkcmds.base
index 569e0a097f..a5f93fe8e1 100644
--- a/bsps/or1k/shared/start/linkcmds.base
+++ b/bsps/or1k/shared/start/linkcmds.base
@@ -310,6 +310,7 @@ SECTIONS {
 
   RamBase = ORIGIN (REGION_WORK);
   RamSize = LENGTH (REGION_WORK);
+  RamEnd = RamBase + RamSize;
   WorkAreaBase = bsp_section_work_begin;
   HeapSize = 0;
 }
diff --git a/bsps/powerpc/gen5200/start/linkcmds.gen5200_base b/bsps/powerpc/gen5200/start/linkcmds.gen5200_base
index ca9d50ebb5..dc7867ca27 100644
--- a/bsps/powerpc/gen5200/start/linkcmds.gen5200_base
+++ b/bsps/powerpc/gen5200/start/linkcmds.gen5200_base
@@ -25,6 +25,7 @@ bsp_section_align = 32;
 
 RamBase = bsp_ram_start;
 RamSize = bsp_ram_size;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
 
 /*
diff --git a/bsps/powerpc/haleakala/start/linkcmds b/bsps/powerpc/haleakala/start/linkcmds
index dad3e5cc76..392e5b8e35 100644
--- a/bsps/powerpc/haleakala/start/linkcmds
+++ b/bsps/powerpc/haleakala/start/linkcmds
@@ -17,6 +17,7 @@ EXTERN(__vectors)
 
 RamBase = DEFINED(RamBase) ? RamBase : 0;
 RamSize = DEFINED(RamSize) ? RamSize : 256M;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
 
 MEMORY {
diff --git a/bsps/powerpc/mpc8260ads/start/linkcmds b/bsps/powerpc/mpc8260ads/start/linkcmds
index 82550d41a8..99501b4e8e 100644
--- a/bsps/powerpc/mpc8260ads/start/linkcmds
+++ b/bsps/powerpc/mpc8260ads/start/linkcmds
@@ -19,6 +19,7 @@ EXTERN(__vectors)
  */
 RamBase     = DEFINED(RamBase) ? RamBase : 0x0;
 RamSize     = DEFINED(RamSize) ? RamDiskSize : 0x0800000; /* 8M program ram */
+RamEnd      = RamBase + RamSize;
 HeapSize    = DEFINED(HeapSize) ? HeapSize : 0x0;
 RamDiskBase = DEFINED(RamDiskBase) ? RamDiskBase : 0x0800000;
 RamDiskSize = DEFINED(RamDiskSize) ? RamDiskSize : 0x0800000; /* 8M ram disk */
diff --git a/bsps/powerpc/shared/start/linkcmds.base b/bsps/powerpc/shared/start/linkcmds.base
index 65ee046b95..f52208186f 100644
--- a/bsps/powerpc/shared/start/linkcmds.base
+++ b/bsps/powerpc/shared/start/linkcmds.base
@@ -396,6 +396,7 @@ SECTIONS {
 	/* FIXME */
 	RamBase = ORIGIN (REGION_WORK);
 	RamSize = LENGTH (REGION_WORK);
+	RamEnd = RamBase + RamSize;
 	WorkAreaBase = bsp_section_work_begin;
 	HeapSize = 0;
 
diff --git a/bsps/powerpc/ss555/start/linkcmds b/bsps/powerpc/ss555/start/linkcmds
index 04c9556397..efdd984ce7 100644
--- a/bsps/powerpc/ss555/start/linkcmds
+++ b/bsps/powerpc/ss555/start/linkcmds
@@ -26,6 +26,7 @@ ext_ram_size	= 0x00080000;		/* size of external RAM */
 
 RamBase = DEFINED(_RamBase) ? RamBase : 0x003F9800;
 RamSize = DEFINED(_RamSize) ? RamSize : 0x00486800;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(_HeapSize) ? HeapSize : 0x0;
 
 SECTIONS
diff --git a/bsps/powerpc/virtex4/start/linkcmds b/bsps/powerpc/virtex4/start/linkcmds
index d46df2f53e..af74d42fa3 100644
--- a/bsps/powerpc/virtex4/start/linkcmds
+++ b/bsps/powerpc/virtex4/start/linkcmds
@@ -16,6 +16,7 @@ EXTERN(__vectors)
 MsgAreaSize       = DEFINED(MsgAreaSize)   ? MsgAreaSize   : 1M;
 RamBase           = DEFINED(RamBase)       ? RamBase       : 0x0;
 RamSize           = DEFINED(RamSize)       ? RamSize       : 128M - MsgAreaSize;
+RamEnd            = RamBase + RamSize;
 HeapSize          = DEFINED(HeapSize)      ? HeapSize      : 0; /* 0=Use def */
 
 
diff --git a/bsps/powerpc/virtex5/start/linkcmds b/bsps/powerpc/virtex5/start/linkcmds
index 9a5edf7643..938b7e1eb5 100644
--- a/bsps/powerpc/virtex5/start/linkcmds
+++ b/bsps/powerpc/virtex5/start/linkcmds
@@ -16,6 +16,7 @@ EXTERN(__vectors)
 MsgAreaSize       = DEFINED(MsgAreaSize)   ? MsgAreaSize   : 1M;
 RamBase           = DEFINED(RamBase)       ? RamBase       : 0x0;
 RamSize           = DEFINED(RamSize)       ? RamSize       : 2048M - MsgAreaSize;
+RamEnd            = RamBase + RamSize;
 HeapSize          = DEFINED(HeapSize)      ? HeapSize      : 0; /* 0=Use def */
 
 
diff --git a/bsps/riscv/shared/start/linkcmds.base.in b/bsps/riscv/shared/start/linkcmds.base.in
index d921e29fe4..b4460338d8 100644
--- a/bsps/riscv/shared/start/linkcmds.base.in
+++ b/bsps/riscv/shared/start/linkcmds.base.in
@@ -328,6 +328,7 @@ SECTIONS {
 	/* FIXME */
 	RamBase = ORIGIN (REGION_WORK);
 	RamSize = LENGTH (REGION_WORK);
+	RamEnd = RamBase + RamSize;
 	WorkAreaBase = bsp_section_work_begin;
 	HeapSize = 0;
 
diff --git a/bsps/sh/gensh1/start/linkcmds b/bsps/sh/gensh1/start/linkcmds
index 1ede3a2fb9..4c2b5e0d77 100644
--- a/bsps/sh/gensh1/start/linkcmds
+++ b/bsps/sh/gensh1/start/linkcmds
@@ -32,6 +32,7 @@ STARTUP(start.o)
 
 _RamBase = DEFINED(_RamBase) ? _RamBase : 0x0a040000;
 _RamSize = DEFINED(_RamSize) ? _RamSize : 512K;
+_RamEnd = _RamBase + _RamSize;
 _HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
 
 MEMORY
diff --git a/bsps/sh/gensh2/start/linkcmds b/bsps/sh/gensh2/start/linkcmds
index d083d33330..abc7a494b6 100644
--- a/bsps/sh/gensh2/start/linkcmds
+++ b/bsps/sh/gensh2/start/linkcmds
@@ -45,6 +45,7 @@ STARTUP(start.o)
 
 _RamBase = DEFINED(_RamBase) ? _RamBase : 0x00440000;
 _RamSize = DEFINED(_RamSize) ? _RamSize : 512K;
+_RamEnd = _RamBase + _RamSize;
 _HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
 
 MEMORY
diff --git a/bsps/sh/gensh2/start/linkcmds.ram b/bsps/sh/gensh2/start/linkcmds.ram
index 01765f683d..7a1431889e 100644
--- a/bsps/sh/gensh2/start/linkcmds.ram
+++ b/bsps/sh/gensh2/start/linkcmds.ram
@@ -44,6 +44,7 @@ STARTUP(start.o)
 /* These assignments load code into SH7045F EVB SRAM for monitor debugging */
 _RamBase = DEFINED(_RamBase) ? _RamBase : 0x00440000;
 _RamSize = DEFINED(_RamSize) ? _RamSize : 512K;
+_RamEnd = _RamBase + _RamSize;
 _HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
 
 MEMORY
diff --git a/bsps/sh/gensh2/start/linkcmds.rom b/bsps/sh/gensh2/start/linkcmds.rom
index d6a1bee744..c56ff6b033 100644
--- a/bsps/sh/gensh2/start/linkcmds.rom
+++ b/bsps/sh/gensh2/start/linkcmds.rom
@@ -44,6 +44,7 @@ STARTUP(start.o)
 /* These asignments represent actual SH7045F EVB architecture */
 _RamBase = DEFINED(_RamBase) ? _RamBase : 0x00400000;
 _RamSize = DEFINED(_RamSize) ? _RamSize : 0x0008000;
+_RamEnd = _RamBase + _RamSize;
 _HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
 
 MEMORY
diff --git a/bsps/sh/gensh4/start/linkcmds b/bsps/sh/gensh4/start/linkcmds
index df1c157865..1fb69c92a5 100644
--- a/bsps/sh/gensh4/start/linkcmds
+++ b/bsps/sh/gensh4/start/linkcmds
@@ -24,6 +24,7 @@ STARTUP(start.o)
 
 _RamBase = DEFINED(_RamBase) ? _RamBase : 0x80000000;
 _RamSize = DEFINED(_RamSize) ? _RamSize : 4M;
+_RamEnd = _RamBase + _RamSize;
 _HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
 
 /*
diff --git a/bsps/sh/gensh4/start/linkcmds.rom b/bsps/sh/gensh4/start/linkcmds.rom
index 49b5b08884..3c70e4c263 100644
--- a/bsps/sh/gensh4/start/linkcmds.rom
+++ b/bsps/sh/gensh4/start/linkcmds.rom
@@ -26,6 +26,7 @@ STARTUP(start.o)
 
 _RamBase = DEFINED(_RamBase) ? _RamBase : 0x88000000;
 _RamSize = DEFINED(_RamSize) ? _RamSize : 8M;
+_RamEnd = _RamBase + _RamSize;
 _HeapSize = DEFINED(_HeapSize) ? _HeapSize : (2 * 1024 * 1024);
 
 /*
diff --git a/bsps/sh/gensh4/start/linkcmds.rom2ram b/bsps/sh/gensh4/start/linkcmds.rom2ram
index 99a4a89147..8d7b0e2380 100644
--- a/bsps/sh/gensh4/start/linkcmds.rom2ram
+++ b/bsps/sh/gensh4/start/linkcmds.rom2ram
@@ -26,6 +26,7 @@ STARTUP(start.o)
 
 _RamBase = DEFINED(_RamBase) ? _RamBase : 0x88000000;
 _RamSize = DEFINED(_RamSize) ? _RamSize : 8M;
+_RamEnd = _RamBase + _RamSize;
 _HeapSize = DEFINED(_HeapSize) ? _HeapSize : (2 * 1024 * 1024);
 
 /*
diff --git a/bsps/sh/shsim/start/linkcmds b/bsps/sh/shsim/start/linkcmds
index c0381c0b14..90f5d6039e 100644
--- a/bsps/sh/shsim/start/linkcmds
+++ b/bsps/sh/shsim/start/linkcmds
@@ -23,6 +23,7 @@ STARTUP(start.o)
 
 _RamBase = DEFINED(_RamBase) ? _RamBase : 0x00000000;
 _RamSize = DEFINED(_RamSize) ? _RamSize : 16M;
+_RamEnd = _RamBase + _RamSize;
 _HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
 
 MEMORY
diff --git a/bsps/sparc64/shared/start/linkcmds b/bsps/sparc64/shared/start/linkcmds
index 9cd4d99583..86a3bdcde1 100644
--- a/bsps/sparc64/shared/start/linkcmds
+++ b/bsps/sparc64/shared/start/linkcmds
@@ -12,6 +12,7 @@
  */
 RamBase = DEFINED(RamBase) ? RamBase : 0x0;
 RamSize = DEFINED(RamSize) ? RamSize : 4M;
+RamEnd = RamBase + RamSize;
 HeapSize = DEFINED(HeapSize) ? HeapSize : 1M;
 
 RAM_END = RamBase + RamSize;
diff --git a/bsps/v850/gdbv850sim/start/linkcmds b/bsps/v850/gdbv850sim/start/linkcmds
index c128a08de1..a5339ef24d 100644
--- a/bsps/v850/gdbv850sim/start/linkcmds
+++ b/bsps/v850/gdbv850sim/start/linkcmds
@@ -3,6 +3,7 @@
  */
 _RamBase = DEFINED(_RamBase) ? _RamBase : 0x100000; /* RAM starts at 1MB */
 _RamSize = DEFINED(_RamSize) ? _RamSize : 0x100000; /* default is 1MB */
+_RamEnd = _RamBase + _RamSize;
 _HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
 
 /* Default linker script, for normal executables */
diff --git a/bsps/x86_64/amd64/start/linkcmds b/bsps/x86_64/amd64/start/linkcmds
index 20de902adb..c60d07d6ec 100644
--- a/bsps/x86_64/amd64/start/linkcmds
+++ b/bsps/x86_64/amd64/start/linkcmds
@@ -28,6 +28,7 @@ RamBase = DEFINED(RamBase)    ? RamBase   :
  */
 RamSize = DEFINED(RamSize)    ? RamSize   :
           DEFINED(_RamSize)   ? _RamSize  : 0x40000000;
+RamEnd = RamBase + RamSize;
 
 SECTIONS
 {
-- 
2.16.4



More information about the devel mailing list