aboutsummaryrefslogtreecommitdiffstats
path: root/support/ld/common_rom.inc
diff options
context:
space:
mode:
Diffstat (limited to 'support/ld/common_rom.inc')
-rw-r--r--support/ld/common_rom.inc13
1 files changed, 13 insertions, 0 deletions
diff --git a/support/ld/common_rom.inc b/support/ld/common_rom.inc
index 7284492..7182a4d 100644
--- a/support/ld/common_rom.inc
+++ b/support/ld/common_rom.inc
@@ -112,6 +112,19 @@ SECTIONS
*(.got.plt) *(.got)
*(.data .data.* .gnu.linkonce.d.*)
+
+
+ /*
+ * Heap: Linker scripts may choose a custom heap by overriding
+ * _lm_heap_start and _lm_heap_end. Otherwise, the heap is in
+ * internal SRAM, beginning after .bss, and growing towards
+ * the stack.
+ *
+ * I'm shoving these here naively; there's probably a cleaner way
+ * to go about this. [mbolivar]
+ */
+ _lm_heap_start = DEFINED(_lm_heap_start) ? _lm_heap_start : _end;
+ _lm_heap_end = DEFINED(_lm_heap_end) ? _lm_heap_end : __cs3_stack;
. = ALIGN (8);
_edata = .;
} > REGION_DATA AT> REGION_TEXT