Introduce instruction memory allocator

Necessary for dlfcn etc on ESP32, which has separate memory regions
for instruction and data.

known issues/todo
 * consider something similar to dual heaps for PROTOECTED
 * consider to adapt binfmt as well
This commit is contained in:
YAMAMOTO Takashi
2020-03-06 14:48:15 +09:00
committed by patacongo
parent 03a916acb8
commit 855751b534
6 changed files with 138 additions and 0 deletions
@@ -60,3 +60,7 @@ MEMORY
/* Heap ends at top of dram0_0_seg */
_eheap = 0x40000000 - CONFIG_ESP32_TRACEMEM_RESERVE_DRAM;
/* Module text area ends at top of dram0_0_seg */
_emodtext = 0x400a0000;
@@ -59,6 +59,10 @@ SECTIONS
*libpp.a:(.literal .text .literal.* .text.*)
*libhal.a:(.literal .text .literal.* .text.*)
_iram_text_end = ABSOLUTE(.);
/* Module text area starts at the end of iram0_0_seg */
_smodtext = ABSOLUTE(.);
} > iram0_0_seg
/* Shared RAM */
@@ -70,6 +70,9 @@ SECTIONS
_text_end = ABSOLUTE(.);
_etext = .;
/* Module text area starts at the end of iram0_0_seg */
_smodtext = ABSOLUTE(.);
} > iram0_0_seg
/* Shared RAM */