binfmt: Support arch copy section by self for dynamic code loading

This option enables architecture-specific memory copy for dynamic code loading.

For example, Ambiq has MRAM regions for instruction which can't load by
the memcpy directly.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
This commit is contained in:
wangjianyu3
2023-08-23 01:11:24 +08:00
committed by Xiang Xiao
parent c749e4bfbd
commit 8a13da322d
3 changed files with 73 additions and 7 deletions
+15
View File
@@ -401,6 +401,12 @@ config ARCH_HAVE_TEXT_HEAP
---help---
Special memory region for dynamic code loading
config ARCH_HAVE_COPY_SECTION
bool
default n
---help---
Section copying for dynamic code loading
config ARCH_HAVE_MULTICPU
bool
default n
@@ -623,6 +629,15 @@ menuconfig ARCH_ADDRENV
Support per-task address environments using the MMU... i.e., support
"processes"
config ARCH_USE_COPY_SECTION
bool "Enable arch copy section by self for dynamic code loading"
default n
depends on ARCH_HAVE_COPY_SECTION
---help---
This option enables architecture-specific memory copy for
dynamic code loading. For example, Ambiq has MRAM regions
for instruction which can't load by the memcpy directly.
if ARCH_ADDRENV && ARCH_NEED_ADDRENV_MAPPING
config ARCH_TEXT_VBASE