From 7212ea877ed85d3b85af90c902639df44fc493f2 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 24 Aug 2019 00:48:40 +0200 Subject: Add exported variable (only functions for now), export main func, start execution from main func --- executor/x86_64/executor.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'executor/x86_64/executor.c') diff --git a/executor/x86_64/executor.c b/executor/x86_64/executor.c index fbe227a..335790a 100644 --- a/executor/x86_64/executor.c +++ b/executor/x86_64/executor.c @@ -64,9 +64,14 @@ void amal_executor_deinit(amal_executor *self) { am_free(impl); } -int amal_executor_run(amal_executor *self) { +int amal_executor_run(amal_executor *self, u32 offset) { IMPL - return asm_execute(&impl->asm); + return asm_execute(&impl->asm, offset); +} + +u32 amal_exec_get_code_offset(amal_executor *self) { + IMPL + return asm_get_size(&impl->asm); } int amal_executor_instructions_start(amal_executor *self, u16 num_functions) { -- cgit v1.2.3