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-09-04 12:23:26 +08:00
committed by Xiang Xiao
parent c749e4bfbd
commit 8a13da322d
3 changed files with 73 additions and 7 deletions
+15
View File
@@ -772,6 +772,21 @@ void up_textheap_free(FAR void *p);
bool up_textheap_heapmember(FAR void *p);
#endif
/****************************************************************************
* Name: up_copy_section
*
* Description:
* Copy section from general temporary buffer(src) to special addr(dest).
*
* Returned Value:
* Zero (OK) on success; a negated errno value on failure.
*
****************************************************************************/
#if defined(CONFIG_ARCH_USE_COPY_SECTION)
int up_copy_section(FAR void *dest, FAR const void *src, size_t n);
#endif
/****************************************************************************
* Name: up_setpicbase and up_getpicbase
*