py/persistentcode: Add ability to relocate loaded native code.

Implements text, rodata and bss generalised relocations, as well as generic
qstr-object linking.  This allows importing dynamic native modules on all
supported architectures in a unified way.
This commit is contained in:
Damien George
2019-10-06 23:29:40 +11:00
parent b310930dba
commit b47e155bd0
9 changed files with 106 additions and 12 deletions

View File

@@ -95,4 +95,6 @@ mp_raw_code_t *mp_raw_code_load_file(const char *filename);
void mp_raw_code_save(mp_raw_code_t *rc, mp_print_t *print);
void mp_raw_code_save_file(mp_raw_code_t *rc, const char *filename);
void mp_native_relocate(void *reloc, uint8_t *text, uintptr_t reloc_text);
#endif // MICROPY_INCLUDED_PY_PERSISTENTCODE_H