aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/sys/module/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'com32/lib/sys/module/exec.c')
-rw-r--r--com32/lib/sys/module/exec.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/com32/lib/sys/module/exec.c b/com32/lib/sys/module/exec.c
index 9da1d572..cbd81d42 100644
--- a/com32/lib/sys/module/exec.c
+++ b/com32/lib/sys/module/exec.c
@@ -11,6 +11,9 @@
#include <string.h>
#include <stdarg.h>
+// The symbol declared in the linker script that indicates the loading point
+// of the COM32R module
+extern char _start[];
#define DBG_PRINT(fmt, args...) fprintf(stderr, "[EXEC] " fmt, ##args)
@@ -30,7 +33,7 @@ static char *module_get_fullname(const char *name) {
return name_buff;
}
-int exec_init(size_t root_addr) {
+int exec_init() {
int res;
res = modules_init();
@@ -44,7 +47,7 @@ int exec_init(size_t root_addr) {
if (mod_root == NULL)
return -1;
- res = module_load_shallow(mod_root, root_addr);
+ res = module_load_shallow(mod_root, (Elf32_Addr)_start);
if (res != 0) {
mod_root = NULL;