summaryrefslogtreecommitdiffstatshomepage
path: root/py/persistentcode.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-10-06 23:29:40 +1100
committerDamien George <damien.p.george@gmail.com>2019-12-12 20:15:28 +1100
commitb47e155bd07e5765b804c404411825b15378c0b6 (patch)
tree48e7c57050d5164e5482c5d9b1b2c2e921729031 /py/persistentcode.h
parentb310930dba3a35dbe4d790f461caf27d78b4c7b9 (diff)
downloadmicropython-b47e155bd07e5765b804c404411825b15378c0b6.tar.gz
micropython-b47e155bd07e5765b804c404411825b15378c0b6.zip
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.
Diffstat (limited to 'py/persistentcode.h')
-rw-r--r--py/persistentcode.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/py/persistentcode.h b/py/persistentcode.h
index 07e018f8a6..fde7a4625d 100644
--- a/py/persistentcode.h
+++ b/py/persistentcode.h
@@ -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