summaryrefslogtreecommitdiff
path: root/utils/mcpu-exec.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/mcpu-exec.h')
-rw-r--r--utils/mcpu-exec.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/utils/mcpu-exec.h b/utils/mcpu-exec.h
new file mode 100644
index 0000000..54c206f
--- /dev/null
+++ b/utils/mcpu-exec.h
@@ -0,0 +1,42 @@
+#ifndef __CPU_EXEC_H
+#define __CPU_EXEC_H
+#include <stddef.h>
+#include "mcpu-asm.h"
+
+typedef struct cpu_exec_options
+{
+ __mpu_uint64_t stack_size;
+ int have_heap;
+ __mpu_uint64_t heap_size;
+ __mpu_uint64_t heap_limit;
+} cpu_exec_options;
+
+typedef struct cpu_exec_loaded
+{
+ int has_init;
+ int has_fini;
+ __mpu_uint64_t start_entry;
+ __mpu_uint64_t init_entry;
+ __mpu_uint64_t life_entry;
+ __mpu_uint64_t fini_entry;
+ __mpu_uint64_t startup_base;
+ __mpu_uint64_t stack_size;
+ int has_data_section;
+ __mpu_uint64_t data_section_begin;
+ __mpu_uint64_t data_section_size;
+} cpu_exec_loaded;
+
+int cpu_exec_write( const char *path, const cpu_asm_image *image,
+ const cpu_exec_options *options, char *err, size_t errsz);
+int cpu_exec_load( const char *path, int argc, char **argv, cpu_exec_loaded *loaded,
+ char *err, size_t errsz);
+int cpu_exec_abi_version( const char *path, unsigned *abi,
+ char *err, size_t errsz );
+int cpu_exec_load_preload( const char *path, const char *preload_list,
+ int argc, char **argv, cpu_exec_loaded *loaded,
+ char *err, size_t errsz);
+int cpu_exec_load_resolved( const char *path, const char *module_list,
+ size_t preload_count,
+ int argc, char **argv, cpu_exec_loaded *loaded,
+ char *err, size_t errsz );
+#endif