summaryrefslogtreecommitdiff
path: root/utils/mcpu-exec.h
diff options
context:
space:
mode:
authorkx <kx@radix-linux.su>2026-10-09 18:00:15 +0300
committerkx <kx@radix-linux.su>2026-10-09 18:00:15 +0300
commit065da3509019b15dd0e678072e6be629e5330bef (patch)
tree69c934c9e786ac048b4fbe8f4c4c5571661521f4 /utils/mcpu-exec.h
parentd130fe27fa753be02ed76fd9b277aa3c3d928eb9 (diff)
downloadlibmcpu-0.4.0.tar.xz
Version 0.4.00.4.0
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